Re: Should packages depend on cron?
On Sat, 26 Jul 1997, Brandon Mitchell wrote:
> On Fri, 25 Jul 1997, Christian Schwarz wrote:
>
> > I've have another idea: I think we only need a solution of how to handle
> > /etc/cron.* jobs if the system was not running at about 6:45am (that's
> > when the jobs are executed).
> >
> > Anacron keeps track of which jobs where executed at which time simply be
> > writing a time-stamp into the /var/spool/anacron/* files. So what about
> > changing "run-parts" to update these files if "cron" did execute the jobs?
> >
> > We could install both, cron and anacron on _every_ system, tell both
> > programs to take control over the /etc/cron.* scripts and run anacron at
> > boot-up time.
> >
> > Systems that are running 24 hours a day will not notice anacron, unless
> > they shutdown the system and power it on later, so that the 6:45am jobs
> > don't run (in which case anacron will start them at bootup time).
> >
> > Systems that are power on and off several times will not notice the "cron"
> > jobs, unless the system is running at 6:45am.
> >
> > Doesn't this sound like a good solution for everyone?
>
> The only problem I can think of is if someone turns on their computer a
> just before cron would normally run a job. Then you get the job run
> twice, but that's no big deal. I think this will work, except that I
> would only have anacron suggested, not required. Yes there are a few
> people who want a bare bones system :-)
Ok, we can only suggest anacron, if that's the only problem. As noone else
objected, I think we should implement this:
- cron will suggest anacron
- anacron will suggest cron
- anacron will add jobs /etc/cron.{daily,weekly,monthly}/anacron to
touch its timestamps (so anacron knows when cron executed the jobs
last time)
- cron will add a line
30 7 * * * root /usr/sbin/anacron || true
so that anacron gets run automatically once per day and this does not
fail if anacron is not available
(yes, I'll move anacron to /usr/sbin :-)
- anacron will enable the following lines in /etc/anacrontab as default:
1 5 cron.daily run-parts /etc/cron.daily
7 10 cron.weekly run-parts /etc/cron.weekly
30 15 cron.monthly run-parts /etc/cron.monthly
- anacron is started at boot up time via /etc/init.d/anacron only,
if it's later than 7:30am.
So default configuration for most people would be cron+anacron. Those who
definitely don't want anacron on their systems can skip it, though.
The /etc/cron.* jobs are executed by cron at 6:42am/6:47am/6:52am as now.
Anacron will check at 7:30am (or later) if the jobs were for that
day. If not, they will be started with 5-15 minutes delay (so you can log
in and start your standard apps before jobs eating all your CPU time :-)
system boot up job execution
====================== ====================
12:00pm -- 6:42am 6:42am
6:42am -- 7:30am 7:30am
7:30am -- 12:00pm boot up time
(Thus, jobs should be executed each day if the system is running at most
20 minutes after 7:30am.)
Steve, do you agree?
Thanks,
Chris
-- Christian Schwarz
schwarz@monet.m.isar.de, schwarz@schwarz-online.com,
Debian is looking schwarz@debian.org, schwarz@mathematik.tu-muenchen.de
for a logo! Have a
look at our drafts PGP-fp: 8F 61 EB 6D CF 23 CA D7 34 05 14 5C C8 DC 22 BA
at http://fatman.mathematik.tu-muenchen.de/~schwarz/debian-logo/
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: