Date: Sun, 7 Apr 2002 11:30:26 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Sam <sam@wa4phy.net> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: DST vs. Cron = Burp Message-ID: <200204071830.g37IUQU34566@apollo.backplane.com> References: <3CB065F0.53CA407A@vortex.wa4phy.net>
next in thread | previous in thread | raw e-mail | index | archive | help
:Awoke this morning to find that one of my users cron job which was
:scheduled for 0300 daily did not run during the night. I can only
:assume that the time change occured promptly at 0200, kicked the time to
:0300, and cron missed things. Probably could have elminated that burp
:had I known what time things kicked off, but now know to change by some
:small amount of time. My only questions is, should this have happened,
:or did I just "luck out" :-)
:
:Sam
Yes, this can happen with Vixie cron. Part of the problem is that
the Vixie cron code is *really* fragile. So, for example, detecting
the difference between someone setting the time and a daylight savings
time skip (forward or backwards), and acting on it properly, is not as
easy as it may sound.
Detection is easy... if the time_t returned by time() doesn't skip, but
the localtime() representation does, then you know that a day light
savings change has occured and can determine whether it is a forward
skip or a reverse skip. If it is a forwards skip then you can
theoretically disable cron's normal sanity checks and allow it to run
all the jobs for that period.
But here is an example of a bug that could occur... lets say that someone
has a once-per-minute cron job. This job might then be started 60 times
in parallel where you really only want one to be started. These are
the sorts of problems that would have to be dealt with so it is not
simply a matter of turning off certain sanity checks for the case.
-Matt
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204071830.g37IUQU34566>
