[clug] systemctl - timer keeps cancelling, I think
Chris Smart
clug at csmart.io
Wed Sep 7 08:24:28 UTC 2022
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, see https://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