RFC: systemd-timers to obsolete crond

Jacek Konieczny jajcus at jajcus.net
Tue Feb 14 14:10:41 CET 2017

On 2017-02-14 13:32, Jacek Konieczny wrote:
> I am not happy with crond running under systemd. The same could be done
> with systemd timers, but we should keep compatibility with old systems.

I guess, I sent the mail too early, as now I have a bit better idea how
it could look like.

A new package: systemd-cronjobs

Provides: cronjobs
Obsoletes: crondaemon

systemctl enable cronjobs.target

systemctl disable cronjobs.target



Updated: systemd-units:


Updated: cronie  (and other crondaemons)
+Provides: cronjobs
  Provides: crondaemon
  Obsoletes: systemd-cronjobs


Updated: logrotate (and other packages providing their crontabs)
-Requires: crondaemon
+Requires: cronjobs



The systemd unit dependencies would be:
cronjobs.target WantedBy multi-user.target
cronjob-*.timer WantedBy cronjobs.target

How it would work:

When systemd-cronjobs is not installed – exactly as it works now.
Scheduled task are run by crond.

Installing systemd-cronjobs would uninstall any crond, but would be
possible only if there is no package left which would Require:
crondaemon (meaning: no cronjob-*.timer yet).

When systemd-cronjobs is installed scheduled tasks would be run from
systemd instead of crond.

Why it is better:
– no crond service running – one process less
– no unnecessary shell processes when a single executable is to be run
– no login session created (lots of PAM and systemd logs) when not necessary

What I am not sure yet:
– is 'Provides: cronjobs' and 'Name: systemd-cronjobs' any good?
– do we still need to care about crond, or should we just migrate
   everything to systemd timers?


More information about the pld-devel-en mailing list