Silent failure of anacron on resume with systemd
24 May 2017Anacron fails silently on resume. It never runs the tasks its supposed
to run. My backups have been failing.
This is a a really annoying failure, and some features are being
implemented in systemd to fix this. See this debian
bugtracker.
My solution for this is to simply have anacron be run every hour by
cron. I have in /etc/cron.d/anacron
# /etc/cron.d/anacron: crontab entries for the anacron package
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
30 * * * * root test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null
which simply runs it every hour now. This is a little annoying, but it's
the best I can do. The debian bugtracker states that it's been fixed in
a future release of systemd. I don't really care because I'm using
Jessie. But Jessie is so old that apparently even critical bugs like
this don't get fixed.