On Thu, 29 Jun 2017 00:16:52 +0200 Michael Biebl wrote: > On Mon, 26 Jun 2017 23:50:51 +0200 "Francesco Poli (wintermute)" > <invernom...@paranoici.org> wrote: [...] > > This is inconsistent with the old behavior and with the behavior > > of boxes with non-systemd init systems (where the check is performed > > at boot or daily at 7:30, if the box is up and running at that time > > of the day). > > > > With the attached patch, the behavior becomes consistent with > > the non-systemd one. Thanks to the Persistent=true directive, > > any skipped checks will be catched up on boot or on resume, > > but the check won't be performed between midnight and 7:30, > > unless the box is booted/resumed in that time interval. > > Afaics, this would basically reopen #744753. > Take a laptop for example, which is charged over night and then booted > in the morning while unplugged. We'd never trigger anacron because of > ConditionACPower=true in anacron.service > By triggering anacron.service hourly it's much more likely we hit a time > window where the system is plugged in.
Fair enough. What about the attached patch? It would at least exclude the time interval between midnight and early morning, while retaining the hourly-repeated-attempts behavior from 07:30 to 23:30. -- http://www.inventati.org/frx/ There's not a second to spare! To the laboratory! ..................................................... Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
diff -ruN a/anacron.timer b/anacron.timer --- a/anacron.timer 2017-05-29 18:36:12.000000000 +0200 +++ b/anacron.timer 2017-06-30 00:49:59.054309949 +0200 @@ -2,7 +2,7 @@ Description=Trigger anacron every hour [Timer] -OnCalendar=hourly +OnCalendar=*-*-* 07..23:30 RandomizedDelaySec=5m Persistent=true
pgpUYWvwpbpTi.pgp
Description: PGP signature