Hi all, 1. For cron jobs, do you use - systemd timer/service, eg. job.timer, job.service, OR - traditional crontab from /etc/cron.daily/job, ... ? 2. After translating to "systemd" scripts, how is the maintenance? --William
William Park via Talk wrote on 2026-01-06 00:24:
1. For cron jobs, do you use - systemd timer/service, eg. job.timer, job.service, OR - traditional crontab from /etc/cron.daily/job, ... ?
I use cron simply due to inertia. Because crontab entries are difficult to edit, I've moved to putting the necessary commands in a shell script and having cron run that. However, at that point I figure I ought to be using systemd.timers. More control and best of all - the answer to "what are the scheduled timer scripts' order of execution and last run results?" is *easy* to answer with `systemctl list-timers`.
2. After translating to "systemd" scripts, how is the maintenance? The timers I do have seem pretty easy: usually the service's unit file (or the script it invokes) gets edited, like my cron-invoked script.
Then, just for good measure, `systemctl daemon-reload`. Also, just for fun, there are some neat things one can do with `systemd-analyze calendar`, such as "when is the next leap year?": systemd-analyze calendar *-02-29 Original form: *-02-29 Normalized form: *-02-29 00:00:00 Next elapse: Tue 2028-02-29 00:00:00 PST (in UTC): Tue 2028-02-29 08:00:00 UTC From now: 2 years 1 month left Or, "when is the next leap year which falls on a saturday?": systemd-analyze calendar "sat *-02-29" Original form: sat *-02-29 Normalized form: Sat *-02-29 00:00:00 Next elapse: Sat 2048-02-29 00:00:00 PST (in UTC): Sat 2048-02-29 08:00:00 UTC From now: 22 years 1 month left
On Tue, 6 Jan 2026 03:24:49 -0500 William Park via Talk <talk@lists.gtalug.org> wrote:
Hi all,
1. For cron jobs, do you use - systemd timer/service, eg. job.timer, job.service, OR - traditional crontab from /etc/cron.daily/job, ... ?
2. After translating to "systemd" scripts, how is the maintenance?
--William
William, I use cron, just like Ron, out of inertia. You can comment your crontab file to make it more readable. # day day # of of # minute hour mon mon week command ############################################### 30 04 * * * DoSomething 50 10 * * tue DoSomethingElse 50 10 * * tue DoYetAnotherThing -- Howard Gibson hgibson@eol.ca http://home.eol.ca/~hgibson
On 2026-01-06 03:24, William Park via Talk wrote:
Hi all,
1. For cron jobs, do you use - systemd timer/service, eg. job.timer, job.service, OR - traditional crontab from /etc/cron.daily/job, ... ?
2. After translating to "systemd" scripts, how is the maintenance?
--William
------------------------------------ Description: GTALUG Talk Unsubscribe via Talk-unsubscribe@lists.gtalug.org Start a new thread: talk@lists.gtalug.org This message archived at https://lists.gtalug.org/archives/list/ talk@lists.gtalug.org/message/AEXZA3BW5FKHXN6WZ25MRQJBRHTEKEU2/
I use crontab for simple one shot tasks at a specified time and tasks that need to run on an interval basis (e.g. every 5 minutes). Examples include: - apt-get update & apt-get dist-upgrade --d -y - some web scrapers - generate notification emails (at midnight) from a calendar system I use systemd for things i want to run, be monitored and be restarted immediately on failure., - other web scrapers - music player daemons - network status monitoring agents I have written Simple and standalone -> crontab More complex, with startup dependencies -> systemd -- Michael Galea
On 2026-01-06 03:24, William Park via Talk wrote:
1. For cron jobs, do you use - systemd timer/service, eg. job.timer, job.service, OR - traditional crontab from /etc/cron.daily/job, ... ?
I'm not a fan of systemd. I didn't know it could be used as an alternative to cron. systemd really is trying to take over the entire system. I would still rather use cron. 'crontab -e' is simple enough way to set up a job. -- Cheers! Kevin. https://www.patreon.com/KevinCozens | "Nerds make the shiny things that | distract the mouth-breathers, and Owner of Elecraft K2 #2172 | that's why we're powerful" #include <disclaimer/favourite> | --Chris Hardwick
participants (5)
-
Howard Gibson -
Kevin Cozens -
Michael Galea -
Ron -
William Park