Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron and time changes

Status
Not open for further replies.

gamerland

Programmer
Apr 6, 2003
53
US
We are adding servers in Austrailia and Japan. These servers show local time, but when we "go dark" once a week we all go down at the same time. When we went to/from Daylight Savings Time, they were off by an hour from the central repository.

Anyone know of a quick and easy way to alter cron processes by an hour. (i.e. script that takes all cron entries and adds or subtracts 1 hour from the start time) I have done it manually a couple of times, but this seems like it should be easy. Is it as simple as:
crontab -l > filename
modify file
crontab filename

Just want to know if anyone has had a problem doing this or if you have done it and can cut/paste.
 
If you know that the time changes are the same each time, I'd keep a copy of your amended crontab and just overwrite the existing one (and issue a crontab <file> as appropriate, reverting to the original when necessary. Does this make sense? - it's been a long Friday!
 
It does make sense, except (always on of those)... we need to ensure that not only cron gets updated with new processes but both &quot;DST&quot; versions do too. While one line in three files is not a big deal, it becomes one if someone new (or old) ever forgets.

Good thought though...thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top