Top
Best
New

Posted by pera 10/27/2025

Avoid 2:00 and 3:00 am cron jobs (2013)(www.endpointdev.com)
341 points | 369 commentspage 4
tonyhart7 10/27/2025||
DST is such a dumb mechanism anyway

just use UTC

dathinab 10/28/2025||
2-3am is bad due to DST but there is another reason to also avoid 3-5am or so

around 3am is the time where "in average" human attention is the worst as its where "in average" their most relevant deep sleep phases are

now I guess the average over HN readers has a good chance to be somewhat later

but either way if the job goes wrong and triggers alarms 2-5am it very bad for the the health and sleep rithm of whoever needs to fix it and the most likely time they make mistakes

it sadly is also the time where non-international interruptions are least likely to matter

if you are an international company having international teams can be an solution

and if you are a very small team adopting job times to an overlap of low usage and your admins sleep habits can be an option

but if you need to pick a generic time and don't provide for logistics or other "start work at 4/5am" companies probably 5-6am is a better time to run your batch jobs

anyway just some random thoughts

p0w3n3d 10/27/2025||
It depends on tz. 4 am in some countries too
raggles 10/27/2025||
I have a job that deliberately runs at 2am and 3am... to update the time in a bunch of really old PLCs for DST. And check that every other device on my telemetry network has correctly updated its time.
throwaway106382 10/27/2025||
bruh, just use UTC
bobmcnamara 10/27/2025|
Ugh gross. Same non monotonic time problems just not every year.

TAI4LYFE!

ray_v 10/28/2025||
Here's my radical time idea: instead of keeping the same schedule year round, we just incrementally chop parts of the day off (we just put that time in a "bucket" and pretend it doesn't exist). Then at the summer equinox we empty the time bucket into a 6 day bender of a party. /s
superkuh 10/27/2025|
This isn't a problem with actual cron and crontab. It is a problem with the systemd-timers shim "crontab" which doesn't work the same in many corner cases and often has weird bugs.
LegionMammal978 10/27/2025||
This post is literally about an issue observed in vixie-cron (as included in some distro c. 2013), not about any systemd implementation.
nailer 10/27/2025||
Exactly! The article makes the point that:

> until one of them achieves cron’s level of ubiquity, we have to live with cron at least some places and sometimes

systemd could arguably be described as close to (maybe behind, maybe ahead of since it's the default for the most popular Linux distros) cron's level of ubiquity, and doesn't have this bug as far as we know.

Kwpolska 10/27/2025|||
Which cron is actual cron? There are tons of implementations out there.

This post describes vixie-cron, not systemd-timers.

ziml77 10/27/2025|||
What do you consider "actual cron"? Because the post specifically says Vixie cron, which has been the basis for most versions of cron on Linux systems.
Bratmon 10/27/2025|||
How does actual cron handle this situation?
lxgr 10/27/2025||
"Not a problem" as in these only run these cron job once per day, irrespective of DST changes making a given "hour happen twice"?