Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 1998 09:30:37 +1300
From:      andrew@squiz.co.nz (Andrew McNaughton)
To:        FreeBSD Mobile <freebsd-mobile@FreeBSD.ORG>
Subject:   Alternatives to cron (was Re: PCMCIA Card Config)
Message-ID:  <v02120d07b107a403f67f@[203.96.56.128]>

next in thread | raw e-mail | index | archive | help
At 7:30 AM 12/2/98, Sean J. Schluntz wrote:
>Mike Smith wrote:
>>
>> > If the system is suspended during the time a cron job is supposed to
>> > take place will it launch as soon as the system unsuspends realizing
>> > that it has missed it's time?
>>
>> No.
>
>Hmm, then leaing it on all the time does not sound like such a hot idea
>to me.  I mean if the system is suspened the hard drive spins down, but
>if you don't have it suspended and your wandering around with the laptop
>you could end up crashing your heads...
>
>-Sean


The problem is broader than just laptops.  I have another process in mind
which _must_ go ahead every night, but needn't be at an exact time.  cron
doesn't handle this well if the server goes down briefly at the wrong
moment, or in rare cases has too high a load and misses a cron job.

If I wind up writing my own solution it will probably be based around a set
of jobs with the last execution time recorded, and rules to derive the next
execution time based on that.  A frequent cron job could then check if
anything is due to be done and if so do it.  If it finds that a job is long
overdue it might mail me about it rather than executing it.  Depends on the
job.

Leaving FreeBSD permanently running is not an option.  Leaving it
permanently connected to the net is not an option either, and some periodic
tasks involve using the net. Seems like a related problem.

It wouldn't be hard to write something, but it seems like a general enough
problem that someone must have already come up with a general and elegant
framework.

Andrew McNaughton



 The effort to understand the universe is       Andrew McNaughton
 one of the very few things that lifts            ++64 4 389 6891
 human life above the level of farce,          andrew@squiz.co.nz
 and gives it some of the grace            http://www.squiz.co.nz
 of tragedy  -  Steven Weinberg         http://www.newsroom.co.nz



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



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