[comp.unix.wizards] cron

m5@lynx.uucp (Mike McNally) (03/16/89)

How does cron behave when the time is changed by a human or by a
demon?  Does it do something clever (?) like remember the last time it
awoke and step through each intervening minute?  What if the time is set
back?

I'm asking about any and all crons, BSD or System V (I realize that the
Sys V cron is bigger than the BSD one).


-- 
Mike McNally                                    Lynx Real-Time Systems
uucp: {voder,athsys}!lynx!m5                    phone: 408 370 2233

            Where equal mind and contest equal, go.

les@chinet.chi.il.us (Leslie Mikesell) (03/17/89)

In article <5312@lynx.UUCP> m5@lynx.UUCP (Mike McNally) writes:
>How does cron behave when the time is changed by a human or by a
>demon?  Does it do something clever (?)

SysV cron is seriously unclever about this.  For example when
daylight savings time ends it runs the 2AM jobs twice.  I had
some real problems due to some files being removed when they
shouldn't have.

Les Mikesell

mjw@ttrdf.UUCP (Matthew J. WIcks) (03/18/89)

In article <5312@lynx.UUCP>, m5@lynx.uucp (Mike McNally) writes:
> How does cron behave when the time is changed by a human or by a
> demon?  Does it do something clever (?) like remember the last time it

On System V systems, my experience is that cron has problems when the time
is changed. In some of my experiences it begins running things twice. Thus
I have developed the policy of killing cron before changing the time and
then re-starting cron.

Matt Wicks
AT&T Skokie
312-982-3358
...att!ttrde!mjw
mjw@ttrde.att.com

jas@ernie.Berkeley.EDU (Jim Shankland) (03/18/89)

In article <7955@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes:
>SysV cron is seriously unclever about [behaving when the time changes].
>For example when daylight savings time ends it runs the 2AM jobs twice.
>I had some real problems due to some files being removed when they
>shouldn't have.

Heh.  So beware of putting non-idempotent operations into your
crontab ("move the wrecking ball 100 yards west," or "transfer
$10 million to account X").

Jim Shankland
jas@ernie.berkeley.edu

"Blame it on the lies that killed us, blame it on the truth that ran us down"