anacron is being run at the wrong time

Bug #1799361 reported by Stephen Worthington
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
anacron (Ubuntu)
New
Undecided
Unassigned

Bug Description

lsb_release -rd:
Description: Ubuntu 18.04.1 LTS
Release: 18.04

I have upgraded from Mythbuntu 16.04 LTS to Ubuntu 18.04.1 LTS. Since the upgrade, anacron has been running my /etc/cron.daily tasks shortly after midnight, rather than shortly after 07:30. This is a significant problem as the daily MythTV database check and backup tasks are resource intensive and interfere with using MythTV and can cause errors in my TV recordings that are happening at the time. I tracked down the source of this problem to the configuration changes done to anacron to make it work from systemd. There is a new systemd unit "anacron.timer" in /lib/systemd/system which is responsible for starting anacron via the "anacron.service" unit. But for some reason, anacron.timer is set to run anacron every hour. Previously, anacron was being run only at startup and once a day. There is no need for anacron to be run hourly - the cron.hourly tasks are run from cron, not anacron. So to fix this, I created a systemd override file:

root@mypvr:/etc/systemd/system/anacron.timer.d# cat anacron-timer-override.conf
[Unit]
Description=Trigger anacron at 07:30, as happened before the Ubuntu 18.04 upgrade.

[Timer]
OnCalendar=
OnCalendar=07:30
RandomizedDelaySec=0s
Persistent=true

I believe the /lib/systemd/system/anacron.timer file from the anacron package should be fixed to run anacron only once daily similar to what my override file does. This would revert anacron to the expected behaviour.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.