You are not logged in.

#1 2016-11-13 21:11

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

force anacron to work on battery

How can I get anacron to work when on battery power?
I have changed /etc/default/anacron to read ANACRON_RUN_ON_BATTERY_POWER=yes but it makes no difference, I have changed the time-stamp files to force it to run, but it simply does nothing unless I am on mains power.
I have tried searching all the files I can find associated to anacron to look for a check to disable but can find nothing. I have already disabled the checks in cron.daily/apt for mains power and I guess there will be more places where this type of check will be made.
Is this actually hard-coded into anacron?

Offline

#2 2016-11-13 21:33

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,284
Website

Re: force anacron to work on battery

Please try to modify line 'ConditionACPower=false' in '/lib/systemd/system/anacron.service' file.

Offline

#3 2016-11-13 21:59

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: force anacron to work on battery

Thanks guys, that worked in Virtualbox so will set laptop now, something else for my after-install script smile

Offline

Board footer

Powered by FluxBB