24 lines
964 B
Markdown
24 lines
964 B
Markdown
# Systemd Timers for Regular Tasks
|
|
|
|
To have custom executables run regulary on given time/interval, you may use the `base::timers` Hiera key:
|
|
|
|
```
|
|
base::timers:
|
|
'timer_test':
|
|
description: 'test timers'
|
|
command: '/usr/bin/logger foo'
|
|
on_calendar: '*:*:10'
|
|
timer_options:
|
|
persistence: false
|
|
```
|
|
|
|
For each timer following keys are mandatory
|
|
|
|
- `description` for a short explaination what it is about
|
|
- `command` for the command to run
|
|
- `on_calendar` defining when it should run using the [`systemd` calendar event format](https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events), (alternatively see also chapter "CALENDAR EVENTS" of `man systemd.date`)
|
|
|
|
Optional is
|
|
- `timer_options` for additional options. In the example it is `persistence`which signals if the timer should run immediately after boot when the node was switched of on the last scheduled run time (default is `false`).
|
|
|