systemd timers
systemd timers
A timer schedules a systemd unit to be activated at a certain time or interval.
Timers are often used with Type=oneshot
services and may be used to replace traditional cronjobs.
By default, a service by the same name as the timer is activated (for example, foo.timer
would activate foo.service
), though this may be changed by setting the Unit property.
The following shows an example timer configuration which would trigger exactly once per day:
[Unit]
Description=Example timer
[Timer]
OnCalendar=daily
# Store timer state on disk so calendar expression accounts for
# missed activations while the system was shut down.
Persistent=true
[Install]
WantedBy=timers.target