[CentOS] cron job not running
joseph85750 at yahoo.com
Mon Mar 5 09:25:39 EST 2012
>From: Tim Dunphy <bluethundr at gmail.com>
>To: CentOS mailing list <centos at centos.org>
>Sent: Sunday, March 4, 2012 8:25 PM
>Subject: [CentOS] cron job not running
>I am attempting to backup a centos 5.4 (x86_64) server running mysql with a cron job. Here's how the cron job looks:
> [root at cloud:/home/bluethundr/backupdb] #crontab -l
> * 3 * * * /usr/bin/mysqldump jfwiki >
> /home/bluethundr/backupdb/wiki-$(date +%Y%m%d).sql
> However if I run the command from the command line it seems to work fine.
Something is probably different in your environment vs cron environment.
Make a cronjob such as:
* * * * * env > /tmp/environment.txt
Let it run for a minute to get the values, then remove the cronjob.
Compare it to the results of 'env' on the command line. Probably a path or some other variable is missing.
More information about the CentOS