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... 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. I hope this patch may be accepted. Thanks for your time! Bye. -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (800, 'testing'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages anacron depends on: ii debianutils 4.8.1.1 ii init-system-helpers 1.48 ii libc6 2.24-12 ii lsb-base 9.20161125 Versions of packages anacron recommends: ii cron [cron-daemon] 3.0pl1-128+b1 ii rsyslog [system-log-daemon] 8.27.0-3 Versions of packages anacron suggests: ii exim4-daemon-light [mail-transport-agent] 4.89-3 pn powermgmt-base <none> -- no debconf information
diff -ruN a/debian/anacron.timer b/debian/anacron.timer --- a/debian/anacron.timer 2017-05-29 18:36:12.000000000 +0200 +++ b/debian/anacron.timer 2017-06-25 11:19:55.071811795 +0200 @@ -2,7 +2,7 @@ Description=Trigger anacron every hour [Timer] -OnCalendar=hourly +OnCalendar=*-*-* 07:30 RandomizedDelaySec=5m Persistent=true