This commit is contained in:
JMARyA 2024-12-23 11:08:19 +01:00
parent 0167d52325
commit bb16b3fceb
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
17 changed files with 100 additions and 11 deletions

View file

@ -18,11 +18,11 @@ systemctl list-timers
## Examples
### Monotonic timer
A timer which will start 15 minutes after boot and again every week while the system is running.
`/etc/systemd/system/foo.timer`
```
```ini
# /etc/systemd/system/foo.timer
[Unit]
Description=Run foo weekly and on boot
@ -35,11 +35,11 @@ WantedBy=timers.target
```
### Realtime timer
A timer which starts once a week (at 12:00am on Monday). When activated, it triggers the service immediately if it missed the last start time (option `Persistent=true`), for example due to the system being powered off:
`/etc/systemd/system/foo.timer`
```
```ini
# /etc/systemd/system/foo.timer
[Unit]
Description=Run foo weekly
@ -59,4 +59,4 @@ An asterisk may be used to specify any value and commas may be used to list poss
In the below example the service is run the first four days of each month at 12:00 PM, but _only_ if that day is a Monday or a Tuesday.
`OnCalendar=Mon,Tue *-*-01..04 12:00:00`
`OnCalendar=Mon,Tue *-*-01..04 12:00:00`