[clug] systemctl - timer keeps cancelling, I think

Tony Lewis tony at lewistribe.com
Wed Sep 7 07:23:12 UTC 2022


I've seen this argument go on for a long time, and at the risk of 
bringing the war to the home front, I will say that I see this side, but 
I also see how good systemd could be, if it wasn't so arcane.

There really should be a way to just say, "run this process, capture all 
its output, and if it dies, start it again".  Yes, we had that with the 
/etc/init.d stuff but it was pretty much cobbled together and cut and 
paste a few thousand times.  Systemd does that better, I think.  If 
systemd solved that, and solved it well, and *only* solved that, then 
I'd be more of a fanboy.  Instead, I agree that it reaches into far too 
much of everything, and it's just not intuitive how to control it, at 
least to me.

Tony

On 7/9/22 16:08, Bob Edwards via linux wrote:
> On Wed, Sep 07, 2022 at 03:02:48PM +1000, jm via linux wrote:
>> A couple of random thought. What does "journalctl -u imapsync-emails", or
>> whatever the timer equivalent, is say? Can you show us the unit file? It
>> sound like it may be set to only fire once. I've not used systemd timers,
>> but am having my own little fight with systemd at the moment. (only know
>> what I just read athttps://wiki.archlinux.org/title/systemd/Timers  )
>>
>> Jeff.
> Fighting with systemd? Surely not!
>
> (it sure is hard for us old-timers who have cut our teeth for decades on
> the old sysinit system, to have to learn a whole new set of ropes for, not
> only init, but also cron, ntp, dns etc. etc. - soon you won't be able to
> even run the C compiler without systemd having its own way of doing it...
> and emacs will be replaced with "systemctl file-edit hello.c" with its
> own bizarre set of key-bindings (excuse the mixed-metaphor)).
>
> cheers,
> Bob Edwards (first post using my personal e-mail address).
>
>> On 7/9/22 13:55, Tony Lewis via linux wrote:
>>> Hello all,
>>>
>>> I'm pretty green with systemctl, but muddle my way through.  I'm using
>>> it to manage my backups.  For one part, it's just not working.
>>>
>>> I have a service that uses imapsync to backup emails, and then calls
>>> borg to push the files into my backup repository.  The timer currently
>>> shows "n/a" for both NEXT and LEFT, and the timer never fires:
>>>
>>> email at host:~$ systemctl --user --all list-timers
>>> NEXT LEFT LAST                         PASSED              UNIT
>>>                   ACTIVATES
>>> n/a  n/a  Sun 2022-05-08 14:45:52 AEST 4 months 0 days ago
>>> imapsync-emails.timer imapsync-emails.service
>>>
>>> If I manually start the service, it work, and the interesting bit is
>>> that for a while, the timer shows that it is intending to fire:
>>>
>>> email at host:~$ systemctl --user start imapsync-emails
>>> email at host:~$ systemctl --user --all list-timers
>>> NEXT                         LEFT          LAST
>>>                          PASSED              UNIT
>>>                   ACTIVATES
>>> Thu 2022-09-08 15:21:33 AEST 1 day 1h left Sun 2022-05-08 14:45:52 AEST
>>> 4 months 0 days ago imapsync-emails.timer imapsync-emails.service
>>>
>>> But after a while (not correlated with when the imapsync job finishes),
>>> it will revert back to "n/a" and not fire.
>>>
>>> I've tried disabling and re-enabling the timer and the service, and it
>>> doesn't appear to help.  The backup job appears to be exiting
>>> successfully:
>>>
>>> Sep 06 09:19:16 host systemd[133305]: imapsync-emails.service: Succeeded.
>>>
>>> Any clues of what I can do?
>>>
>>> Tony
>>>
>>
>> -- 
>> linux mailing list
>> linux at lists.samba.org
>> https://lists.samba.org/mailman/listinfo/linux


More information about the linux mailing list