douglas mcdonald wrote:

>
> ------------------------------------------------------------------------
> crontab.err file:
> ------------------------------------------------------------------------
> sh: mysqldump: command not found

Jobs run from cron have a very sparse environment. You need to either use full paths 
to your excutables, or source in the environment (or parts of it) that the command 
line user has. The former is easier, if you aren't calling too many things outside of 
you script. The latter is better if you have a complex environment or you script(s) 
calls a
number of executables (otherwise you need to fully qulaify each one, e.e. /bin/date 
instead of date, etc.).

An aside, you don't need to use & the way you are doing your redirects. the & means 
duplicate the output to something/somewhere else, so you would say 2>&1 to duplicate 
standard error to standard out. Since you have each going to a different location, 
there is no need to duplicate any output.

>0 6 * * * /library/webserver/data/usc_live_db.pl \ 1>& 
>/library/webserver/data/crontab.log \ 2>& /library/webserver/data/crontab.err
0 6 * * * /library/webserver/data/usc_live_db.pl \ 1> 
/library/webserver/data/crontab.log \ 2>
/library/webserver/data/crontab.err

Reply via email to