From owner-freebsd-stable Sun Apr 7 11:30:38 2002 Delivered-To: freebsd-stable@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id ADBB237B400 for ; Sun, 7 Apr 2002 11:30:33 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g37IUQU34566; Sun, 7 Apr 2002 11:30:26 -0700 (PDT) (envelope-from dillon) Date: Sun, 7 Apr 2002 11:30:26 -0700 (PDT) From: Matthew Dillon Message-Id: <200204071830.g37IUQU34566@apollo.backplane.com> To: Sam Cc: freebsd-stable@FreeBSD.ORG Subject: Re: DST vs. Cron = Burp References: <3CB065F0.53CA407A@vortex.wa4phy.net> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :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