- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- cron and daylight saving time
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 01:25 AM
10-26-2005 01:25 AM
What happens with cron jobs when time goes back: for example I have a cron job starting every day at 2:15am.
Because of daylight saving time once per year 2:15am will be twice at the same day (between saturday and sunday).
Will crontab job be executed twice in the same day ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 03:21 AM
10-26-2005 03:21 AM
SolutionAs always, time on the system is stored and handled as a universal UTC time reference that ALWAYS increments.
So cron also stores the time to execute a job at a unique UTC value, and that value never occurs twice in a day. (except if there is a bug in cron as in old V4.0 versions or if you restart the deamon during the hour of change)
What a human sees is just the human readable representation of the same UTC value and that representation changes depending on zoneinfo and dayligth saving settings.
Regards,
Johan.
_JB_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 04:47 AM
10-26-2005 04:47 AM
Re: cron and daylight saving time
This patch fixes cron scheduling for Daylight Savings time event.
Cron jobs scheduled to run at 2am and 3am were not run when switching
from EST to EDT.( DST change over ). This patch fixes this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2005 06:10 PM
10-26-2005 06:10 PM
Re: cron and daylight saving time
Thank you people !
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2005 01:22 AM
10-27-2005 01:22 AM
Re: cron and daylight saving time
What if you don't handle a TIMEZONE with daylight saving on it. If you change the time, let's say, step back one hour, will cron note this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2005 08:19 PM
10-30-2005 08:19 PM
Re: cron and daylight saving time
Timers in UNIX are recorded on the callout queue. The requests on the queue are ordered by when they go off and relative to the current time. When the system time is changed, nothing happens to the callout queue. Which is fine for interval timers which are supposed (for instance) to go off every couple of seconds. But for requests that are originally based on an absolute time, these may go off at the wrong time.
I believe the cron daemon places requests on the callout queue too to handle its job.
Of course it would be better not to have to change the time of the system. When changing time because of daylight savings time, it would be better to setup a timezone. As I suggested in another thread, you can define your own zone. Using timezones nothing has to change (the callout queue is relative to UTC time, which doesn't change).