[CentOS] Crontabs

Kai Schaetzl maillists at conactive.com
Wed Jun 10 09:31:34 UTC 2009


James Bensley wrote on Wed, 10 Jun 2009 09:08:52 +0100:

> 30 20 * * * sh /home/a_user/nightlyscrips/nightly_script_1 >
> /home/a_user/nightlyscripts/`date +%d-%m-%Y--%H-%M-%S`.log

change the ">" to "&>" to get all output.
Furthermore, there might be a problem to run date in this environment. The 
path in cron is not the same as in your root account. Change the logfile 
to a fixed name and it will work.
Btw, there is no need for the logs. If you omit them you get the output 
mailed.

Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com






More information about the CentOS mailing list