Operating System - HP-UX
1835079 Members
3325 Online
110073 Solutions
New Discussion

script scheduled with cron rc=1

 
SOLVED
Go to solution
claudio_22
Regular Advisor

script scheduled with cron rc=1

Hello,

I've following script scheduled

/opt/adm/soe/bin/checkdb > /tmp/checkdb.log 2>&1

Script consists of :

#!/sbin/sh
su - orah70 -c "brconnect -u / -c -f check"


I've rc=1 while script execute normal ; just some warnings


outuput of /tmp/checkdb.log
.
.

BR806I End of BRCONNECT processing: cdofrwuz.chk 2004-09-20 15.08.21
BR280I Time stamp 2004-09-20 15.08.21
BR803I BRCONNECT terminated successfully with warnings

3 REPLIES 3
Mark Greene_1
Honored Contributor

Re: script scheduled with cron rc=1

Change your script to this:

#!/sbin/sh
su - orah70 -c "brconnect -u / -c -f check >>/tmp/checkdb.log 2>&1"

mark
the future will be a lot like now, only later
claudio_22
Regular Advisor

Re: script scheduled with cron rc=1

Thanks but don't work ; I've following ..

Ambiguous output redirect


Sridhar Bhaskarla
Honored Contributor
Solution

Re: script scheduled with cron rc=1

Hi Claudio,

See what you get if you run the command manually

#su - orah80 -c "brconnect -u / -c -f check"
#echo $?

If $? above returns 1, then that's what you are getting in your cron out.. You will need to find out why your brconnect is terminating with warnings.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try