Package: anacron
Version: 2.3-23
Severity: important

Dear Maintainer,

Anacron almost never runs on my system. As something that is supposed
to add some degree of reliability to cron, this is problematic.

I think I have worked out the cause, which is that I usually switch my
laptop on while on battery. This causes Anacron to skip running at
boot. It looks like the next time that Anacron will be run is 7:30am,
by /etc/cron.d/anacron. Therefore, if, like me, you switch your laptop
on before plugging it in, and don't have it switched on at 7:30am, no
cron.daily (etc.) jobs are ever run.

I think a good solution to this is to run Anacron when power is plugged
in.

For me, this udev rule is working well. I've created the file
/etc/udev/rules.d/anacron.rules with:

    SUBSYSTEM=="power_supply", ATTR{online}=="1", 
RUN+="/etc/pm/power.d/10_anacron"

Maybe it would be best to include a check that run-on-battery is set to
no, so that it doesn't get run twice in that situation.

Bug #666390 may relate to this.

-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500,
'xenial'), (10
0, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-78-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (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.7
ii  init-system-helpers  1.29ubuntu4
ii  libc6                2.23-0ubuntu7
ii  lsb-base             9.20160110ubuntu0.2

Versions of packages anacron recommends:
ii  cron [cron-daemon]           3.0pl1-128ubuntu2
ii  rsyslog [system-log-daemon]  8.16.0-1ubuntu3

Versions of packages anacron suggests:
ii  postfix [mail-transport-agent]  3.1.0-3
ii  powermgmt-base                  1.31+nmu1

-- no debconf information

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to