Top
Best
New

Posted by pera 1 day ago

Avoid 2:00 and 3:00 am cron jobs (2013)(www.endpointdev.com)
332 points | 367 commentspage 4
p0w3n3d 1 day ago|
It depends on tz. 4 am in some countries too
tonyhart7 1 day ago||
DST is such a dumb mechanism anyway

just use UTC

raggles 1 day ago||
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.
atoav 1 day ago||
If you want to avoid overlapping runs simply simply have the task check for the existence of a lockfile, if not create a lockfile containing the start timestamp, run the task and delete the lockfile at exit or error.

The timestamp gives you a chance to recognize stale/orphraned lock files in case of crashes based on their age.

throwaway106382 1 day ago||
bruh, just use UTC
bobmcnamara 1 day ago|
Ugh gross. Same non monotonic time problems just not every year.

TAI4LYFE!

ray_v 1 day ago||
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 1 day ago|
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 1 day ago||
This post is literally about an issue observed in vixie-cron (as included in some distro c. 2013), not about any systemd implementation.
nailer 1 day ago||
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 1 day ago|||
Which cron is actual cron? There are tons of implementations out there.

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

ziml77 1 day ago|||
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 1 day ago|||
How does actual cron handle this situation?
lxgr 1 day ago||
"Not a problem" as in these only run these cron job once per day, irrespective of DST changes making a given "hour happen twice"?