Gregory K. Ruiz-Ade wrote:
> On Jul 21, 2008, at 4:22 PM, [EMAIL PROTECTED] wrote:
> 
>> Laptop users that suspend don't really have another choice.
>> That alternative is to run your daily cron jobs yourself at a
>> convenient time.
>> That introduces human error into the equation.
>>
>> Suspending laptop users are just need to tough it on this one.
> 
> 
> From what I recall on a moderately recent Linux install on a laptop,
> anacron will run periodically through the day out of cron itself and
> "catch up" on things that were missed, I think.  I remember finding
> things kicking off via anacron after waking a laptop.
> 
> Checking /etc/anacrontab on my CentOS system (whitespace trimmed):
> 
> 
> # /etc/anacrontab: configuration file for anacron
> # See anacron(8) and anacrontab(5) for details.
> SHELL=/bin/sh
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> 1       65      cron.daily              run-parts /etc/cron.daily
> 7       70      cron.weekly             run-parts /etc/cron.weekly
> 30      75      cron.monthly            run-parts /etc/cron.monthly
> 
> 
> So, it tries to catch up on the periodic stuff for you.
>

Unless I'm mistaken, anacron runs on boot and according to man anacron
  "When there are no more jobs to be run, Anacron exits"
means that it does no further checking until the next time it is started
by an init.d script.

==> if a live anacron daemon itself does not survive a suspend/resume,
then the problem that CS describes would seem real. A box that is
suspended most of the time and runs only for short periods will likely
miss cron tasks and anacron does not help unless explicitly started.

if anacron itself restarts on resume, then it seems like after
accumulating 65-75 mins of on-time, it might do what is needed (maybe).
Depends on when it checks for missed work -- if it does that on start,
than I suppose anacron really needs to be restarted on resume.

So, it may well be reasonable to use a custom anacrontab (with small
delays) with an anacron explicitly started at resume. I thought that was
 what CS was suggesting.

I wonder if hibernate has the same problem, does that not use the same
suspend/resume scripts?

==> Waitamin: ubuntu 8.04 has _something_ about anacron in
  /etc/apm/event.d/anacron

Does anybody know what that does, and if it's relevant here? The
embedded comments sound like it does address the kind of thing asked.
However if the standard anacron has 65-75 min delays and the laptop is
not on for that long, then (conceivably) anacron never fires anything
off, no?

==> Maybe lower the delays in /etc/anacrontab or modify the
/etc/apm/event.d/anacron script to somehow pass an override anacrontab
file to the start command.

Regards,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to