Operating System - HP-UX
1753786 Members
7277 Online
108799 Solutions
New Discussion юеВ

crontab command during spring time transition

 
BERTRAND_7
Frequent Advisor

crontab command during spring time transition

Hi everybody,

I have a cron command that is running everynight at 2:45 am.
After reading the cron manual pages, it's still not quite clear for me at what time this command will run during the spring time transition.
My understanding is that the second after 1:59:59 is 3:00:00
So will my command run at 3:00 or at 3:45 ?
Thanks for your help.
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: crontab command during spring time transition

Hi:

According to the manpages for 'cron(1M)', "when a command is specified to run at a nonexistent time, the command is executed after the specified time by an amount of time equal to the DST-shift."

Hence, your command should run at 2:45 plus one hour or at 3:45.

Regards!

...JRF...
Matti_Kurkela
Honored Contributor

Re: crontab command during spring time transition

See the paragraph titled "Spring and Autumn Time Transitions" in "man 1m cron" for terminology (I'm using version 11.23 as my reference).

When 1:59:59 is followed by 3:00:00, the event scheduled to run at 2:45 am would run at _nonexistent time_.

----quote----
When a command is specified to run at a nonexistent time, the command is executed after the specified time by an amount of time equal to the DST-shift.
----end quote----

The DST-shift is +1 hour, so your command will run at "2:45 am" + 1 hour = 3:45 am on the day of transition (only).

If the command is scheduled to re-run on non-transition days, it will of course run at 2:45 am then.

MK
MK