diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-04-30 15:14:56 +0200 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-04-30 15:14:56 +0200 |
commit | 4223e9afd4401bd930ca815ffa816eb76fad83f6 (patch) | |
tree | b8907fc631e2ad61b7c8741304b8cd6e6e4a53de /Systemd timer.md | |
parent | f43d0473320b9b2297b1a00880316aee9066b81a (diff) |
vault backup: 2025-04-30 15:14:56
Diffstat (limited to 'Systemd timer.md')
-rw-r--r-- | Systemd timer.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Systemd timer.md b/Systemd timer.md new file mode 100644 index 0000000..72f50b8 --- /dev/null +++ b/Systemd timer.md @@ -0,0 +1,45 @@ +--- +tags: + - systemd +--- +Managed similarly to a unit. So we can start/stop/enable them etc. + +List: `systemctl list-timers [--all]` + +**Realtime Timers**; same as cron. Use `OnCalendar` +**Monotonic Timers**; Varying start point, then interval. E.g `OnBootSec` specifies start x seconds after boot. + +Each `foo.timer` has a `foo.service` which it calls. Service doesn't need install section. Timer can call different unit by `[Timer] Unit=` + +# Time span format +usec, us, μs +msec, ms +seconds, second, sec, s +minutes, minute, min, m +hours, hour, hr, h +days, day, d +weeks, week, w +months, month, M (defined as 30.44 days) +years, year, y (defined as 365.25 days) + +# OnCalendar Format +`DayOfWeek Year-Month-Day Hour:Minute:Second` + +``` +OnCalendar=Mon,Tue *-*-01..04 12:00:00 +OnCalendar=Sat *-*-1..7 18:00:00 +OnCalendar=*-*-* 4:00:00 +OnCalendar=Mon..Fri 22:30 +OnCalendar=Sat,Sun 20:00 +OnCalendar=*-*-* 02:00:00 Europe/Paris +``` + + + + + + +--- +https://wiki.archlinux.org/title/Systemd/Timers +https://man.archlinux.org/man/systemd.time.7 +https://man.archlinux.org/man/systemd.timer.5
\ No newline at end of file |