Hello @Trevor
To trigger a systemd timer every day at 7:15 AM, we can use this calendar specification:
OnCalendar=07:15
Systemd assumes:
- Every day
- Seconds = 00
Also, here is the fully qualified form:
OnCalendar=*-*-* 07:15:00
Year(*)-Month(*)-Day(*) Hour(7):Minute(15):Second(0)
Happy Learning
# /etc/systemd/system/trevor.timer
[Unit]
Description=Daily Backup
[Timer]
OnCalendar=*-*-* 07:15:00
Persistent=true
[Install]
WantedBy=timers.target
You can verify this with:
#systemd-analyze calendar "*-*-* 07:15:00"
https://documentation.suse.com/smart/systems-management/html/systemd-working-with-timers/index.html
https://opensource.com/article/20/7/systemd-calendar-timespans
# systemd-analyze calendar "*-*-* 07:15:00"
This command is so cool! Being able to verify a specific syntax in
the unit file, and not the entire unit file itself, is just too cool!!!
Many thanks Chetan!!!
To trigger a systemd timer every day at 7:15 AM, use this calendar specification:
# OnCalendar=*-*-* 07:15:00
This runs the associated service once daily at that time.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.