[CentOS] cron job not running
Joseph Spenner
joseph85750 at yahoo.com
Mon Mar 5 14:25:39 UTC 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
>
>hello list,
>
>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
mailing list