Hi, I have a strange problem here. I have two servers, one dedicated webserver, and a local backup server. On the webserver I have this : [root at 12569hpv163154:~] # crontab -l 00 22 * * * /usr/local/bin/sauvegarde-pmbccps.sh This launches a backup script every day at 22:00, and it works as expected. Now here's what I have on the local backup server : [root at grossebertha:~] # crontab -l 24 17 * * * /usr/local/bin/sauvegarde.sh Here, the script /usr/local/bin/sauvegarde.sh basically launches an incremental backup with rsync over SSH. The script is executable OK, it works very well when launched by hand on the command line... except cron won't start it. Here for example I tried to launch it on 17:24. Nothing. I checked the machine 'date', it's OK. Now I don't have the slightest clue why this doesn't work. What's the magic word here ? Cheers, Niki
On Oct 30, 2009, at 9:29 AM, Niki Kovacs wrote:> Now here's what I have on the local backup server : > > [root at grossebertha:~] # crontab -l > 24 17 * * * /usr/local/bin/sauvegarde.shYou may have checked already, but make sure that crond is running, i.e. /sbin/service crond status. I get crond (pid 1706) is running.... Thanks, Dianne -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20091030/683f7ceb/attachment-0001.html>
Niki Kovacs wrote:> Now I don't have the slightest clue why this doesn't work. What's the > magic word here ?You check the cron log? maybe it ran it just had an error so it didn't produce the results you expected. It's also good to send STDOUT/STDERR to a file for easier debugging of cron stuff. Also note that cron takes a minute to load the config, so for example if it was :23 after the hour and you put in a new entry to run at :24 after the hour it likely will not run. Just thought to toss that in in the event you tried something like that. nate
Dianne wrote:> On Oct 30, 2009, at 9:29 AM, Niki Kovacs wrote: >> Now here's what I have on the local backup server : >> >> [root at grossebertha:~] # crontab -l >> 24 17 * * * /usr/local/bin/sauvegarde.sh > > You may have checked already, but make sure that crond is running, > i.e. /sbin/service crond status. I get crond (pid 1706) is running.... >Check the environment. You've got the full environment; cron doesn't. mark