Anacron is started/stopped by a number of means, one of which is when AC power is plugged/unplugged, as can be seen by examining /etc/apm/event.d/anacron and /usr/lib/pm-utils/power.d/anacron. You can also see in var/log/syslog that anacron stops/starts when you unplug and replug the laptop. This a power saving feature.When anacron runs the cron.daily batch of jobs, initially 0anacron is called, and it updates the /var/spool/anacron/cron.daily time stamp (anacron -u cron.daily) to the current date, before anacron goes on to process the remainder of the scripts (alphabetically, I believe).All well and good, but let's say we have the scenario where the cron.daily batch begins to run, the time stamp gets updated for cron.daily, but then sometime before completion the user unplugged the AC stopping anacron. What now? If the user replugs in (either after or before rebooting), anacron will relaunch, but upon checking the timestamp for cron.daily it will see it as newer than one day old, and deem the batch complete for the day.Can someone confirm if this really is the case? It would seem to explain why my backup script has not run some days, but ran fine on others. Then if so, why is the timestamp updated before the jobs run and not after all have completed?
Unplug AC causes anacron to stop. No resumumption if cron.daily had already started?
cron