Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|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. –  fpmurphy1 Oct 11 '09 at 15:44
    
Thank you. That has solved my problem. –  ayaz Oct 11 '09 at 16:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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