Am 12.03.22 um 20:40 schrieb Michael Stone:
On Sat, Mar 12, 2022 at 03:19:52PM +0800, Paul Wise wrote:Hideki Yamane wrote:Is there any suggestion or guideline for pacakges that contain both systemd-timer unit setting and cronjob? Don't they conflict or notDo what apt does; make the cron job exit successfully without doing anything when run on systemd, move most of what is being run into a script or program in /usr, then call that from the timer and cron job. Alternatively, make the cron job exit successfully without doing anything when run on systemd, then have the timer call the cron job with a --run-on-systemd argument that makes it run under systemd.These are still somewhat annoying in practice because of the log entries for CRON running something pointlessly.
That is indeed true. I guess we have three options here:- Teach cron about systemd timers and allow cron entries to be marked with meta data that tells cron that when run under systemd it should skip those entries.
- Ship native systemd timer units for all packages and no longer install cron by default
- If a package is shipping a native systemd timer unit, it should drop the corresponding cron files. Those should be generated on the fly on non-systemds based on the systemd timer.
Description: OpenPGP digital signature