Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 1997 09:53:49 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: conf/5254: patch for /usr/src/etc/crontab 
Message-ID:  <199712150153.JAA27760@spinner.netplex.com.au>
In-Reply-To: Your message of "Sun, 14 Dec 1997 23:20:32 %2B0100." <199712142220.XAA01080@uriah.heep.sax.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
J Wunsch wrote:
> "Studded" <Studded@dal.net> wrote:
> 
> >> The correct thing to do is teaching cron about DST switches.  Patches
> >> for this were floating around, offhand i'm not sure whether there's an
> >> open PR for this.
> > 
> > 	Wouldn't running it at 01:59 work?
> 
> Still US-centric (or incidentally also Germany-centric :).  As i
> wrote, last time we've been discussing it, we found that there's no
> agreeable time in the night period where a DST switch wouldn't be
> possible in some timezone of the world.  Moving the problem away to
> another set of people is not a solution.  This PR should be closed,
> with a reference to the PR containing the better fix (to cron).  I
> don't have the PR # handy, sorry.

I use what I thought was a neat hack.  I run the daily/weekly/montly etc
type scripts several times a night.  In daily's case, it's 2am, 3am, 4am,
5am.  It keeps a 'last run' timestamp in /var/db and at start time, it
checks to see if it was within the last 12 hours or so and exits if so.
This means that I can have a machine offline for a couple of hours
overnight and still have the regular scripts run.  It's also reasonably
immine to DST and clock shifts.  The only catch is that it's easy to get
different jobs running in parallel if it's been off for a while and not 
so simple to check the timestamp.  I used a perl script, I don't think our 
find does mtime in minutes yet like gnu find, does it?

And then there's the cron script that checks and restarts cron if it 
dies or locks up or stops running jobs.  Yes, this does happen..

> -- 
> cheers, J"org
> 
> joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)
> 

Cheers,
-Peter
--
Peter Wemm <peter@netplex.com.au>   Netplex Consulting





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