forked from linux/documentation
more timer options
This commit is contained in:
1 parent
8e6c9ba59e
commit
0f459a88eb
1 file changed
+12
@@ -1,5 +1,8 @@
|
||||
# Systemd Timers for Regular Tasks
|
||||
|
||||
|
||||
## Create New Timer
|
||||
|
||||
To have custom executables run regulary on given time/interval, you may use the `base::timers` Hiera key:
|
||||
|
||||
```
|
||||
@@ -12,6 +15,9 @@ base::timers:
|
||||
persistence: false
|
||||
service_options:
|
||||
Environment: 'SOME_ENV=some_value'
|
||||
service_unit_options:
|
||||
OnSuccess: 'dnf-automatic'
|
||||
OnFailure: 'send-failure-email'
|
||||
```
|
||||
|
||||
This then creates both the required timer and service unit files for systemd.
|
||||
@@ -26,3 +32,9 @@ Optional is
|
||||
- `timer_options` for additional configuration in the `Timer` section of the timer unit. 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`).
|
||||
- `service_options` for additional configuration in the `Service` section of the service unit.
|
||||
|
||||
## Enable/Disable Existing Timer
|
||||
```
|
||||
base::timers:
|
||||
'certbot':
|
||||
enable: true
|
||||
```
|
||||
Reference in new issue
Block a user