[arch-general] Comment on: Use systemd timers instead of /etc/cron.{hourly, daily, weekly, monthly}?

Maciej Puzio mx34567 at gmail.com
Tue May 6 14:23:26 EDT 2014


Thomas Bächler wrote:
> Of course you can configure the elapse time, by adjusting the associated
> .timer unit. With anacron, there was no way to adjust the time, so this
> is a step forward.

As I wrote before, I can edit every timer file and set the elapse
time. What I can't do is to change one setting which says when daily
maintenance tasks are run. This was possible with cron, but is no
longer possible now. What's the problem to edit four files? Well, this
is multiplied by the number of machines that are under my care.
Again, here is relevant systemd RFE link:
https://bugs.freedesktop.org/show_bug.cgi?id=77938

On Mon, May 5, 2014 at 12:21 PM, Leonid Isaev <lisaev at umail.iu.edu> wrote:
> AFAIU systemd is supposed to start timers "randomly" in the time interval
> [1d, 1d + 12h]; different timers are started in parallel. Are you arguing that
> the starting time is not "random" enough?

I am not arguing on what systemd is supposed to do, but describing
what it is doing in practice. Testing shows that there is a clear
discrepancy between the former and the latter, possibly a result of a
bug. From what I have seen, there is no randomness in timer elapse
time at all.

> Systemd timers (at least in the current form) are _not_ cron replacement.
> However, they are adequate for daily maintainance jobs that are shipped with
> packages. If you had custom, carefully scheduled cron jobs, you should
> continue using cronie. What I don't understand is why do you care when
> man-db/updatedb runs?

Updatedb is I/O intensive and should run at time when servers are
least used. I am not really the first person to bump into this issue;
maintenance tasks were by default scheduled to run between 4 and 7am
since the dawn of Linux. That is - until now. In Arch they now run at
midnight.

> The scripts mainly set up the environment which is now done by systemd. You
> issue is with scheduling, and it will _not_ go away because scripts are still
> executed by systemd (as opposed to cronie).

No, my main issue is system maintainability. I find it unacceptable to
separately schedule every single maintenance script on every machine.
With cron I could just schedule when daily jobs were run - that was
one setting.


More information about the arch-general mailing list