# systemd-cronjobs **Repository Path**: mirrors_pld-linux/systemd-cronjobs ## Basic Information - **Project Name**: systemd-cronjobs - **Description**: crond-like services for systemd - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-09 - **Last Updated**: 2026-10-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README systemd-cronjobs - crond replacement using systemd timers ========================================================= The purpose of this package is to replace any crond package in PLD with much more powerful systemd timers, while not forcing them for every PLD installation. The package does not aim to be backward-compatible with existing crontabs. This could be done with some wrapper or systemd generator, but the cron jobs would be still designed for crond and just extra overhead would be added under systemd. Guarding any crontab entry with /sbin/systemd_booted is an extra overhead for non-systemd systems. The idea is that PLD packages can provide both crontabs and systemd timers, like they provide systemd units and init.d startup scripts. When a crond is installed, the crontabs would be used, when the new 'systemd-cronjobs' package is installed, then the systemd timers will be used. systemd-cronjobs obsoletes all cron daemons, so it can be used when no crond services are required in the system – neither by any of installed packages, nor by users. Packaging cronjobs ------------------ /etc/cron.{hourly,daily,monthly,weekly} only ............................................ Just make sure they don't require 'crondaemon' or 'crontabs', a directory dependece should pull a crond or systemd-cronjobs. Explicit 'Require: cronjobs' can be added, but is not required /etc/cron.d/* crontabs, no existing systemd timers .................................................. Until systemd-cronjobs compatible timer units are added, the old 'crondaemon' or 'crontabs' dependency should be used. To make package compatible with systemd-cronjobs systemd timer and service units should be added for every crontab entry: cronjob-%{name}.timer cronjob-%{name}.service For a crontab like this: 01 23 * * * someuser do_something The equivalent systemd units would be: cronjob-something.timer: [Unit] Description=something cronjob timer [Timer] OnCalendar=23:01 [Install] WantedBy=cronjobs.target cronjobs-something.service: [Unit] Description=something cronjob [Service] ExecStart=/usr/bin/do_something User=someuser The first one defines the schedule and should be WantedBy cronjobs.target (not multi-user.target, so it is used only when crond is not installed). The other defines how the service should be started each time the timer fires. The usual %systemd_{post,preun,reload} macros should be used in %post/%preun/%postun for the cronjob-%{name}.timer unit. After systemd timers are added the 'crondaemon'/'crontabs' dependency should be changed to: Requires: cronjobs. This will allow using crond or systemd timers. systemd-only packages ..................... Packages that are designed only for systemd do not need this systemd-cronjobs package. They may provide just own systemd timers, installed under multi-user.target or timers.target. packages with upstream provided crontabs and systemd timers ........................................................... If upstream provides crontab and systemd.timer that don't conflict with each other, then they can be used and the crondaemon/crontabs/cronjobs dependecny may be dropped (unless it is critical for the timed services to be started). Packaging cron daemons ---------------------- Cron daemon packages should Provide and Obsolete 'cronjobs' in addition to 'crondaemon' and 'crontabs'.