When a laptop is turned on w/o AC power plugged in, things like anacron should be deferred. This is the default behaviour in debian, and I was wondered to discovered it is not an upstream anacron feature. Reproducible: Always Steps to Reproduce: turn on a laptop w/ anacron installed and daily/weekly job pending Actual Results: the job will start running in a few minutes Expected Results: w/o AC power on, it should have been deferred Following debian, amended start() in /etc/init.d/anacron to defer when on battery, as follows: start() { ebegin "Running anacron" if test -x /usr/bin/on_ac_power then /usr/bin/on_ac_power >/dev/null if test $? -eq 1 then ewarn "deferred while on battery power." fi else /usr/sbin/anacron -s >>/var/log/cron.log 2>&1 fi eend $? } You may make it into a use flag (I suggest it being a default feature) if you think it's not a sensible change, although I can't imagine somebody acknowledging sporadic cronjob runs enough to install anacron in the 1st place, and object to such a change.
Uh, use runlevels for this. http://www.gentoo.org/doc/en/power-management-guide.xml
> Uh, use runlevels for this. > > http://www.gentoo.org/doc/en/power-management-guide.xml Thanks for the tip! a much better solution, indeed, and also provides for auto-starting anacron back once plugged in. V