1752423 Members
6140 Online
108788 Solutions
New Discussion юеВ

Re: cron woes

 
Ron Irving
Trusted Contributor

cron woes

Hi guys!!

I have a script that needs to be run at 3AM. It has to be run as the oraprod user. So, I open crontab, # crontab -e oraprod - set all the settings, (full path and everything) - make sure oraprod is in the cron.allow file, and let her rip. The script deosn't run. There is no fanfare in the log file, just,

CMD: /u03/oracle/oraprod/backup/do_backup.sh
> oraprod 12542 c Sun Jun 5 14:10:00 WAT 2011
< oraprod 12542 c Sun Jun 5 14:10:00 WAT 2011 rc=1


Any ideas?

Ron
Should have been an astronaut.
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: cron woes

Hi Ron:

If would be helpful to see the actual script. You might temporarily add 'set -x' to it and let 'cron' mail that trace to you.

Regards!

...JRF...
klb
Valued Contributor

Re: cron woes


I believe rc=1 just means your script has failed. Try running it from the command line directly to make sure it's doing what you think it should.

Hth,

-klb
Ron Irving
Trusted Contributor

Re: cron woes

I ran it just the other night to make a backup of an environment. The DBA who created it is on R&R right now. I'll pass this all up to him upon his return. I get to go on R&R in 3 days. We'll work it out.

thanks for your help guys.
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: cron woes

thanks again
Should have been an astronaut.
Matti_Kurkela
Honored Contributor

Re: cron woes

Cron normally emails any error messages to the owner of the cron job. Look into /var/mail/oraprod, or see if the DBA has forwarded oraprod's mail to some other location (look into /etc/mail/aliases and ~oraprod/.forward, if it exists).

MK
MK
Dennis Handly
Acclaimed Contributor

Re: cron woes

>I have a script that needs to be run at 3AM

Should we worry that 14:10:00 != 0300?