anacron is being run at the wrong time
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:
[Unit]
Description=Trigger anacron at 07:30, as happened before the Ubuntu 18.04 upgrade.
[Timer]
OnCalendar=
OnCalendar=07:30
RandomizedDelay
Persistent=true
I believe the /lib/systemd/