Files
gitea-pages/admin-guide/configuration/software/timers.md

964 B

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, (alternatively see also chapter "CALENDAR EVENTS" of man systemd.date)

Optional is

  • timer_options for additional options. In the example it is persistencewhich signals if the timer should run immediately after boot when the node was switched of on the last scheduled run time (default is false).