Take the 2-minute tour ×

There is a known behavior of anacron not to run when the laptop is running on batteries. Is there any way to stop this behavior and run anacron whatever the power state?




share|improve this question
Are you sure it's up to anacron ? cron.daily/apt, cron.daily/mlocate and cron.daily/apt-xapian-index do call /usr/bin/on_ac_power explicitly to check whether the script is being run on a battery. You could probably just comment these conditions within those scripts as a solution. –  user40613 Jan 9 '12 at 21:28
add comment

1 Answer

up vote 1 down vote accepted

I found how to do this and summarized it in my blogpost


To change this behavior of anacron do the following:

 sudo gedit /usr/lib/pm-utils/power.d/anacron

and change to

case $1 in
 start -q anacron || :
 start -q anacron || :
share|improve this answer
add comment

Your Answer


