Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Apr 1998 03:01:05 -0700
From:      Studded <Studded@san.rr.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        Archie Cobbs <archie@whistle.com>, hackers@FreeBSD.ORG
Subject:   Re: Daylight Savings Time - bug
Message-ID:  <3529F961.31919220@san.rr.com>
References:  <199804070803.BAA25988@usr09.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:

> How does cron deal with time adjustments?  

	Like so much else in the unix world, it expects the operator to be
smarter than it is. :) There are a couple of us who are working on some
proposals for Paul Vixie along the following lines.

15 2S * * * /job
	Would run the job in standard time all year round, ignoring DST
15 2U * * * /job
	Runs the job in UTC time.

	Without modification the job would happen or not happen the same way it
does now. I would like to add a warning for the user if they schedule a
job that happens during the magic hour. This would probably require a
text file somewhere, probably in /var/cron. The implementation would be
something like:

1. cron starts up, polls the system to determine the dates and hour of
the DST change and compares the value in the file (if any) to the answer
it received and writes it as necessary. 

2. User foo edits their crontab file and adds a job that is scheduled
during the magic hour. While crontab writes out the tab it checks for
this condition and warns the user that they've scheduled a job during
this time period and they gives them options, something like:

Your job "15 2 * * * /usr/foo" is scheduled during the hour of the
Daylight Savings Time transition in the Pacific time zone where this
machine is located. If this might result in a scheduling problem please
read the "Sceduling Options" section of the man page for crontab(5). 

3. cron saves the fact that it's warned the user about this job to the
file mentioned above, perhaps using an MD5 checksum of the job for
security? 

4. When user foo does subsequent updates to their crontab as long as
they don't change that job they won't get warned about that job. 
Comments?

Doug

-- 
***         Chief Operations Officer, DALnet IRC network       ***
*** Proud operator, designer and maintainer of the world's largest
*** Internet Relay Chat server.  5,328 clients and still growing.
*** Try spider.dal.net on ports 6662-4    (Powered by FreeBSD)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3529F961.31919220>