2 ms·
I fully expected one item to show up here, since this was shared at such an auspicious moment: don’t schedule any daily tasks between 1 and 2am local time, to a
by macintux 5y ago
I fully expected one item to show up here, since this was shared at such an auspicious moment: don’t schedule any daily tasks between 1 and 2am local time, to avoid DST changes from either skipping or running them twice.
(Unless cron has gotten smarter since last I used it, which was admittedly at least a decade ago.)
- blibble 5y agomost cron implementations have logic to handle it (whether or not you trust that is another thing...)
- chasil 5y agoVixie cron (in the RedHat realm, written by Paul Vixie) addresses this. Local time changes of less than three hours, such as those caused by the Daylight Saving Time changes, are handled in a special way. This only applies to jobs that run at a specific time and jobs that run with a granularity greater than one hour. Jobs that run more frequently are scheduled normally. If time was adjusted one hour forward, those jobs that would have run in the interval that has been skipped will be run immediately. Con‐ versely, if time was adjusted backward, running the same job twice is avoided. Time changes of more than 3 hours are considered to be corrections to the clock or the timezone, and the new time is used immediately. It is possible to use different time zones for crontables. See crontab(5) for more information. Vixie crontabs also allow @reboot that enables any user with cron access to run programs at boot, which can be quite useful.