Date: Sat, 20 Jan 2001 12:39:59 -0800 (PST) From: babkin@FreeBSD.org To: freebsd-gnats-submit@FreeBSD.org Subject: bin/24494: daylight time change support in cron Message-ID: <200101202039.f0KKdxq32408@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 24494 >Category: bin >Synopsis: daylight time change support in cron >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jan 20 12:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Sergey Babkin >Release: 5.0-current >Organization: >Environment: >Description: Cron may skip or repeat the jobs falling into the interval that gets missing or duplicated during the time change to daylight saving or back. I'll commit my change directly to -current, here is description and test example for tracking purposes: Now the jobs run as intuitively expected. If a job falls into time interval that disappears during switch from standard time (ST) to daylight saving time (DST) or is duplicated during the reverse switch, then it's handled in one of 2 ways. The jobs that run every hour work as before, they skip the skipped hour or run in the added hour as usual. But the jobs that run less frequently are executed exactly once, they are not skipped nor executed twice (unless cron is restarted or the user's crontab is changed during such a time interval). Test crontab: 0 1 * * * /home/guest/testdst at one OCLOCK 0 0-1 * * * /home/guest/testdst at zero to one range OCLOCK 0 2 * * * /home/guest/testdst at two OCLOCK 0 1-2 * * * /home/guest/testdst at one to two range OCLOCK 0 3 * * * /home/guest/testdst at three OCLOCK 1 1 * * * /home/guest/testdst at one 1 0-1 * * * /home/guest/testdst at zero to one range 1 2 * * * /home/guest/testdst at two 1 1-2 * * * /home/guest/testdst at one to two range 1 3 * * * /home/guest/testdst at three test script testdst: #!/bin/sh date "+%D %T %Z testdst $* " >> /home/guest/dst.log (trace excerpt starts at 1:55 EST) 04/02/00 03:00:00 EDT testdst at two OCLOCK 04/02/00 03:00:00 EDT testdst at three OCLOCK 04/02/00 03:01:01 EDT testdst at two 04/02/00 03:01:01 EDT testdst at three (trace excerpt ends at 3:05 EDT) (trace excerpt starts at 0:55 EDT) 10/29/00 01:00:00 EDT testdst at zero to one range OCLOCK 10/29/00 01:00:00 EDT testdst at one OCLOCK 10/29/00 01:00:01 EDT testdst at one to two range OCLOCK 10/29/00 01:01:00 EDT testdst at zero to one range 10/29/00 01:01:00 EDT testdst at one 10/29/00 01:01:00 EDT testdst at one to two range 10/29/00 01:00:00 EST testdst at zero to one range OCLOCK 10/29/00 01:00:00 EST testdst at one to two range OCLOCK 10/29/00 01:01:00 EST testdst at zero to one range 10/29/00 01:01:00 EST testdst at one to two range 10/29/00 02:00:00 EST testdst at one to two range OCLOCK 10/29/00 02:00:00 EST testdst at two OCLOCK 10/29/00 02:01:02 EST testdst at two 10/29/00 02:01:02 EST testdst at one to two range 10/29/00 03:00:00 EST testdst at three OCLOCK 10/29/00 03:01:00 EST testdst at three (trace excerpt ends at 3:05 EST) >How-To-Repeat: >Fix: will commit to -current >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101202039.f0KKdxq32408>
