cron problem

Ray Van Dolson rvandolson at esri.com
Fri Apr 6 15:53:53 UTC 2007


On Fri, Apr 06, 2007 at 10:41:33AM -0500, Barry Brimer wrote:
> 
> 
> On Fri, 6 Apr 2007 m.roth2006 at rcn.com wrote:
> 
> >Ok, folks, I'm going nuts. I've set up a cron job to run a script to back 
> >up Oracle. In the crontab entry, I've got it piping stdout and stderr to 
> >append to a logfile. It runs late every Thursday night.
> >
> >Well, allegedly.
> >
> >I find entries in /var/log/cron saying it ran... but there's no backup, 
> >and no log. Just this week, I added set -x in the script.
> >
> >Nada.
> >
> >Any suggestions? Oh, and yes, if I run it manually, it works just fine. 
> >The no output log *really* drives me nuts....
> 
> Any chance that this script is relying on environment variables that are 
> available in your current session, but would not be in the cron execution? 
> Are you sourcing any needed environment in the script?  Is there anything 
> in the email that cron sends to the user who owns the cron job that would 
> give more information?

The environmental variables thing is likely the issue.  You should set
ORACLE_SID and ORACLE_HOME and also update your PATH to include any of
the Oracle binaries you'll be needing.

Ray




More information about the redhat-list mailing list