[mythtv-users] anacron time change after upgrade to Ubuntu 18.04

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Nov 10 14:42:14 UTC 2018


On Sat, 10 Nov 2018 07:18:29 -0500, you wrote:

>So my DB maintenance ran a 5:35am as expected.  So if I want to run all 
>my daily maintenance task along with the systems task, but delay that 
>from midnight to ~5:30 the steps are:
>
>1. move scripts to the /etc/cron.daily directory
>
>2. sudo systemctl edit anacron.timer  # add the following text when 
>editor opens:*
>*
>
>[Unit]
>Description=Trigger anacron at 05:30, instead of midnight, the default for Ubuntu 18.04
>
>[Timer]
>OnCalendar=
>OnCalendar=05:30
>RandomizedDelaySec=0s
>Persistent=true
>
>3. sudo systemctl daemon-reload
>4. sudo systemctl restart anacron.timer

Yes.  But if you already have ancron.timer running at a suitable time,
you do not need to touch it - just add the jobs to cron.daily.

>So I now have multiple ways of doing all this timed running of the DB 
>maintenance. It really boils down to whether all of the maintenance 
>needs to be moved because recording/transcoding activity is heavy at 
>that time or whether you just need to run your own jobs at a certain time.
>
>Thanks for all the help. I've certainly learned more about cron and anacron.

I am only a couple of months ahead of you learning all this.  I really
hated having the database jobs running just after midnight, but fixing
it meant I had to learn exactly how Ubuntu does it now.

>Jim A


More information about the mythtv-users mailing list