[clug] systemctl - timer keeps cancelling, I think

Tony Lewis tony at lewistribe.com
Wed Sep 7 11:02:41 UTC 2022


Hi Chris,

It's not a oneshot, and in fact in typical fashion I think I might have 
fixed it.  I went through the stop, disable, enable, start loop and it 
might be working now.  I have it on a daily cycle so will check tomorrow 
before extending it out a couple of days.

Thanks for everyone's consideration.

Tony

On 7/9/22 18:24, Chris Smart via linux wrote:
> On Wed, 7 Sep 2022, at 17:23, Tony Lewis via linux wrote:
>> 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.
>>
> Is your service of type oneshot? I.e.
>
> [Service]
> Type=oneshot
>
> What's your timer set to? E.g.
>
> [Timer]
> OnBootSec=
> OnCalendar=Mon *-*-* 00:00:00
> Persistent=true
>
> For an example, seehttps://blog.christophersmart.com/2021/05/23/auto-update-pi-hole-with-systemd-timer/  
>
> Also, do you need to enable linger for your user?
>
> sudo loginctl enable-linger "${USER}"
>
> -c
>


More information about the linux mailing list