What are systemd timers and how do they compare to cron?
IntermediateConceptProcesses, Signals & systemd
Answer
A .timer unit triggers a matching .service unit.
# backup.timer
[Timer]
OnCalendar=*-*-* 02:30:00
Persistent=true
RandomizedDelaySec=10m
[Install]
WantedBy=timers.target
Advantages over cron: logs in journald, dependencies, resource limits, Persistent=true runs missed jobs after downtime, and no overlapping runs of the same service. systemctl list-timers shows next and last run. Validate expressions with systemd-analyze calendar "Mon *-*-* 09:00".
More on Processes, Signals & systemd
What is the difference between a program, a process and a thread?BeginnerHow are new processes created in Linux?IntermediateWhat is a zombie process, and how do you get rid of it?IntermediateWhat is an orphan process?BeginnerExplain the process states shown in ps (R, S, D, T, Z).IntermediateWhy can't you kill a process in D state?Advanced