On Mon, 26 Jun 2017 23:50:51 +0200 "Francesco Poli (wintermute)" <invernom...@paranoici.org> wrote: > Package: anacron > Version: 2.3-24 > Severity: normal > Tags: patch > > Hello, > I see that bug #744753 has been solved by changing the frequency at > which anacron checks whether there are jobs to be executed. > When systemd is PID 1, anacron performs this check hourly via > timer, rather than daily at 7:30, as done on boxes where systemd is > *not* PID 1 (/etc/cron.d/anacron). > > This behavior change has a significant side effect: if the box > is up and running at midnight, anacron may begin to execute > daily (and possibly also weekly or monthly) jobs shortly after. > Maybe it will (attempt to) start a backup or something like that, > after midnight, when it could be time to shut the box down...
If you run a backup via cron you should guard it against accidental shutdown in any case. systemd-inhibit is the tool you might want to look into. > 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. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature