-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystemd.timer.j2
56 lines (54 loc) · 2.19 KB
/
systemd.timer.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[Unit]
Description={{ description }}
Requires={{ timer_exec_unit }}
ConditionUser={{ unit_condition_user }}
{%- if unit_on_failure %}
OnFailure={{ unit_on_failure }}
{%- endif %}
{%- if unit_on_success %}
OnSuccess={{ unit_on_success }}
{%- endif %}
[Timer]
Unit={{ timer_exec_unit }}
AccuracySec={{ timer_accuracy_sec | default("60") }}
RandomizedDelaySec={{ timer_randomized_delay_sec | default("0") }}
FixedRandomDelay={{ timer_fixed_random_delay | default("false") }}
OnClockChange={{ timer_on_clock_change | default("false") }}
OnTimezoneChange={{ timer_on_timezone_change | default("false") }}
Persistent={{ timer_persistent | default("false") }}
WakeSystem={{ timer_wake_system | default("false") }}
RemainAfterElapse={{ timer_remain_after_elapse | default("true") }}
{#- Defines a timer relative to the moment the timer unit itself is activated. #}
{%- if timer_on_active_sec %}
OnActiveSec={{ timer_on_active_sec }}
{%- endif %}
{#- Defines a timer relative to when the machine was booted up. In containers, for the
system manager instance, this is mapped to OnStartupSec=, making both equivalent. #}
{%- if timer_on_boot_sec %}
OnBootSec={{ timer_on_boot_sec }}
{%- endif %}
{#- Defines a timer relative to when the service manager was first started.
For system timer units this is very similar to OnBootSec= as the system
service manager is generally started very early at boot. It's primarily
useful when configured in units running in the per-user service manager,
as the user service manager is generally started on first login only, not
already during boot. #}
{%- if timer_on_startup_sec %}
OnStartupSec={{ timer_on_startup_sec }}
{%- endif %}
{#- Defines a timer relative to when the unit the timer unit is activating
was last activated. #}
{%- if timer_on_unit_active_sec %}
OnUnitActiveSec={{ timer_on_unit_active_sec }}
{%- endif %}
{#- Defines a timer relative to when the unit the timer unit is activating
was last deactivated. #}
{%- if timer_on_unit_inactive_sec %}
OnUnitInactiveSec={{ timer_on_unit_inactive_sec }}
{%- endif %}
{#- Defines realtime (i.e. wallclock) timers with calendar event expressions. #}
{%- if timer_on_calendar %}
OnCalendar={{ timer_on_calendar }}
{%- endif %}
[Install]
WantedBy=timers.target