I've a cron job that should run every day at 1700 hours from Saturday to Sunday. However, it runs on the system at 0100 hours instead.

The schedule descriptor string used to define the table for this particular job in question is: 0 17 * * 0-6

The system on which this crontab exists is CentOS 5.2 with ISC Cron V4.1 running on it. I did, recently, change the timezone on the system from PDT to BST by creating a symbolic link at /etc/localtime pointing to /usr/share/zoneinfo/GB. However, I do not believe that to have caused this problem as I remember the cron job running at 0100 hours before.

Any insights? I'd appreciate any help I could get on this. Thank you.

link|improve this question
feedback

1 Answer

up vote 7 down vote accepted

Crond is likely still in the old timezone, restart it (from a shell with the right timezone) to pick up the new TZ variable.

link|improve this answer
"However, I do not believe that to have caused this problem as I remember the cron job running at 0100 hours before". Right, because it was running it at 1700PDT. And it probably still is. – wfaulk Oct 11 '09 at 15:29
You really should not change timezones on a running system without rebooting the system. – fpmurphy Oct 11 '09 at 15:44
Thank you. That has solved my problem. – ayaz Oct 11 '09 at 16:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.