

Weird for sure. Why do you keep on asking this question in different ways on different accounts? Are you trying to justify it? Is it a fetish?
Inquiring minds want to know!


Weird for sure. Why do you keep on asking this question in different ways on different accounts? Are you trying to justify it? Is it a fetish?
Inquiring minds want to know!


That’s because you know cron. If you knew timers equally as well they would be easier. And they let you handle the edge cases (retry, randomness, tracking, logs etc) without the need for a custom script.
Once you factor in the production edge cases I think timers are clearly easier. You get all of it for free.


I think if you know cron from the start it can be easier, but it gets really annoying really fast.
Compare:
0 0 * * * /usr/bin/flock -n /tmp/myjob.lock bash -c 'sleep $((RANDOM % 3600)) && /usr/local/bin/myjob.sh'
To:
[Timer]
OnCalendar=daily
RandomizedDelaySec=1h
That and things like systemd preventing overlapped delays, handing what to do if the system was down during the last cycle, built in logging and event tracking. Seeing successful vs non successful runs etc.
Once you add in those production requirements cron gets annoying fast and timers are easy.


The main functional difference between systemd and others is that systemd will just work. Others will require you hand tune and hand tinker with a non-mainstream Linux distro.
If your hobby is init systems by all means mess around though.
I personally quite like systemd. Unit files are clean, timers services and sockets are easy to manage etc.
Honestly it’s a non-problem. Best advice is to use what is best supported. Don’t let the extremely fringe (but loud) tiny group of systemd haters throw you off.
Fedora with Niri on laptop / desktop.
Alma Linux on servers.


Level 4 self driving cars.
I can see how for some people cron is more straightforward to learn, at least till you need to handle logging, checking for cron results, handling when the triggered event can’t happen that instance, ensuring only one instance of the triggered thing happens at once, adding time jitter, etc.
Then timers are way simpler. Timers let you create robust timed events for free. With cron you need to do all that yourself.