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

Jim Abernathy jfabernathy at gmail.com
Fri Nov 9 11:17:46 UTC 2018


On 11/9/18 5:59 AM, Jim Abernathy wrote:
>
> On 11/9/18 1:52 AM, Stephen Worthington wrote:
>> On Thu, 8 Nov 2018 22:17:11 -0500, you wrote:
>>
>>>>> jim at mythbuntu:~$
>>>> Your override file does not seem to be correct.  It looks like you are
>>>> getting the 07:30 time, but also the original "hourly" setting is
>>>> still in place.  Please take a look at your
>>>> /etc/systemd/system/anacron.timer.d/override.conf file and compare it
>>>> to mine:
>>>>
>>>> [Unit]
>>>> Description=Trigger anacron at 07:30, as happened before the Ubuntu
>>>> 18.04 upgrade.
>>>>
>>>> [Timer]
>>>> OnCalendar=
>>>> OnCalendar=07:30
>>>> RandomizedDelaySec=0s
>>>> Persistent=true
>>>>
>>>> Note the first "OnCalendar=" line.  That is what overrides the
>>>> original OnCalendar settings and disables them, and I think it must be
>>>> damaged or missing.  Without that, the second "OnCalendar=07:30" line
>>>> will just add another timer at 07:30 and leave the hourly timer also
>>>> running.
>>> I put my file is pastebin:
>>>
>>> https://pastebin.com/wzw7Q9nK
>>>
>>> Looks okay to me.
>> Yes, it does look OK.  So I am rather at a loss as to why it is not
>> working, unless there is more than one override file.  Please check
>> the /etc/systemd/system/anacron.timer.d directory and see if there is
>> more than one *.conf file there.  I am not expecting that there will
>> be another file, but that is about all I can think of that would cause
>> this.
>>
>> Clearly, your override file is working at least somewhat - it is
>> creating an 07:30 trigger for anacron.timer.  But it does not seem to
>> be overriding the "OnCalendar=hourly" line from
>> /lib/systemd/system/anacron.timer.
>>
>> What does this command show now:
>>
>> sudo systemctl cat anacron.timer
>>
>> It should show exactly the same as mine (except for a different file
>> name for your override file):
>>
>> # /lib/systemd/system/anacron.timer
>> [Unit]
>> Description=Trigger anacron every hour
>>
>> [Timer]
>> OnCalendar=hourly
>> RandomizedDelaySec=5m
>> Persistent=true
>>
>> [Install]
>> WantedBy=timers.target
>>
>> # /etc/systemd/system/anacron.timer.d/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
>>
>> And please check that the "OnCalendar=" line in the override file does
>> not have any spaces or tabs after the = character.  If there is any
>> whitespace, it may be causing this problem.  But I can not see any in
>> the pastebin copy.
> jim at mythbuntu:~$ sudo systemctl cat anacron.timer
> # Warning: anacron.timer changed on disk, the version systemd has 
> loaded is outdated.
> # This output shows the current version of the unit's original 
> fragment and drop-in files.
> # If fragments or drop-ins were added or removed, they are not 
> properly reflected in this output.
> # Run 'systemctl daemon-reload' to reload units.
> # /lib/systemd/system/anacron.timer
> [Unit]
> Description=Trigger anacron every hour
>
> [Timer]
> OnCalendar=hourly
> RandomizedDelaySec=5m
> Persistent=true
>
> [Install]
> WantedBy=timers.target
>
> # /etc/systemd/system/anacron.timer.d/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
>
BTW, I think the Warning was generated because when I edited the file 
last night to cut and paste the content to pastebin for you, I must have 
saved it without really changing it.

Anyway, the DB maintenance didn't run at midnight, so now we'll see what 
happens around 7:30.

Jim A




More information about the mythtv-users mailing list