[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Q: systemd-timer vs cron



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 not

Do 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.


Reply to: