diff --git a/docs/admin-guide/configuration/software/timers.md b/docs/admin-guide/configuration/software/timers.md index 5fe26b18..dcfed09b 100644 --- a/docs/admin-guide/configuration/software/timers.md +++ b/docs/admin-guide/configuration/software/timers.md @@ -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 +```