this post was submitted on 21 Nov 2025
44 points (97.8% liked)
Linux
10229 readers
710 users here now
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
My number one reason for using systemd timers is just that I find it more readable than cron. Usually I want to run things
daily,weeklyormonthlyand systemd timers make that very easy.Here is an example:
backup.timer
backup.service
Another great feature is that the output of the script is logged to journald which is very convenient when you are troubleshooting why your backup failed last night.
You can also easily see when the job last ran, if it was successful and when it will next run. As well as just trigger the service if you want it to run now.
While
crontabalso has keywords for@daily,@weeklyand@monthly, the automatic logging ofsystemdis useful and your example shows that it additionally allows to specify delays. I don't know howanacronhandles the latter.