X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=man%2Fsystemd.timer.xml;h=340286d9128aa5cef8f3bb495951723d3f68dc81;hb=f627573031fe4e7d13fab402b7e27e84a00acef8;hp=26a47a1e5ab12d2bc30ff87b2bd951c2c038ec90;hpb=271312e37b0b98ac184f60d006577f1788c31f58;p=thirdparty%2Fsystemd.git diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml index 26a47a1e5ab..340286d9128 100644 --- a/man/systemd.timer.xml +++ b/man/systemd.timer.xml @@ -1,39 +1,12 @@ - - + - - + systemd.timer systemd - - - - Developer - Lennart - Poettering - lennart@poettering.net - - @@ -62,9 +35,9 @@ this unit type. See systemd.unit5 for the common options of all unit configuration files. The common - configuration items are configured in the generic [Unit] and - [Install] sections. The timer specific configuration options are - configured in the [Timer] section. + configuration items are configured in the generic [Unit] and + [Install] sections. The timer specific configuration options are + configured in the [Timer] section. For each timer file, a matching unit file must exist, describing the unit to activate when the timer elapses. By @@ -84,18 +57,36 @@ Automatic Dependencies - Timer units automatically gain a Before= - dependency on the service they are supposed to activate. - - Unless DefaultDependencies= in the [Unit] section is set to - , all timer units will implicitly have dependencies of type Requires= and - After= on sysinit.target, a dependency of type Before= - on timers.target, as well as Conflicts= and Before= on - shutdown.target to ensure that they are stopped cleanly prior to system shutdown. Timer units - with at least one OnCalendar= directive will have an additional After= - dependency on time-sync.target to avoid being started before the system clock has been - correctly set. Only timer units involved with early boot or late system shutdown should disable the - DefaultDependencies= option. + + Implicit Dependencies + + The following dependencies are implicitly added: + + + Timer units automatically gain a Before= + dependency on the service they are supposed to activate. + + + + + Default Dependencies + + The following dependencies are added unless DefaultDependencies=no is set: + + + Timer units will automatically have dependencies of type Requires= and + After= on sysinit.target, a dependency of type Before= + on timers.target, as well as Conflicts= and Before= on + shutdown.target to ensure that they are stopped cleanly prior to system shutdown. Only timer + units involved with early boot or late system shutdown should disable the + DefaultDependencies= option. + + Timer units + with at least one OnCalendar= directive will have an additional After= + dependency on time-sync.target to avoid being started before the system clock has been + correctly set. + + @@ -114,23 +105,49 @@ OnUnitInactiveSec= Defines monotonic timers relative to different - starting points: OnActiveSec= defines a - timer relative to the moment the timer itself is activated. - OnBootSec= defines a timer relative to when - the machine was booted up. OnStartupSec= - defines a timer relative to when systemd was first started. - OnUnitActiveSec= defines a timer relative - to when the unit the timer is activating was last activated. - OnUnitInactiveSec= defines a timer relative - to when the unit the timer is activating was last - deactivated. - - Multiple directives may be combined of the same and of - different types. For example, by combining - OnBootSec= and - OnUnitActiveSec=, it is possible to define - a timer that elapses in regular intervals and activates a - specific service each time. + starting points: + + + Settings and their starting points + + + + + Setting + Meaning + + + + + OnActiveSec= + Defines a timer relative to the moment the timer unit itself is activated. + + + OnBootSec= + 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. + + + OnStartupSec= + 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. + + + OnUnitActiveSec= + Defines a timer relative to when the unit the timer unit is activating was last activated. + + + OnUnitInactiveSec= + Defines a timer relative to when the unit the timer unit is activating was last deactivated. + + + +
+ + Multiple directives may be combined of the same and of different types, in which case the timer + unit will trigger whenever any of the specified timer expressions elapse. For example, by combining + OnBootSec= and OnUnitActiveSec=, it is possible to define a + timer that elapses in regular intervals and activates a specific service each time. Moreover, both + monotonic time expressions and OnCalendar= calendar expressions may be combined in + the same timer unit. The arguments to the directives are time spans configured in seconds. Example: "OnBootSec=50" means 50s after @@ -145,13 +162,12 @@ and the configured unit is started. This is not the case for timers defined in the other directives. - These are monotonic timers, independent of wall-clock - time and timezones. If the computer is temporarily suspended, - the monotonic clock stops too. + These are monotonic timers, independent of wall-clock time and timezones. If the computer is + temporarily suspended, the monotonic clock pauses, too. - If the empty string is assigned to any of these options, - the list of timers is reset, and all prior assignments will - have no effect. + If the empty string is assigned to any of these options, the list of timers is reset (both + monotonic timers and OnCalendar= timers, see below), and all prior assignments + will have no effect. Note that timers do not necessarily expire at the precise time configured with these settings, as they are @@ -175,7 +191,13 @@ the AccuracySec= setting below. - May be specified more than once. + May be specified more than once, in which case the timer unit will trigger whenever any of the + specified expressions elapse. Moreover calendar timers and monotonic timers (see above) may be + combined within the same timer unit. + + If the empty string is assigned to any of these options, the list of timers is reset (both + OnCalendar= timers and monotonic timers, see above), and all prior assignments + will have no effect. @@ -213,7 +235,7 @@ distributed amount of time between 0 and the specified time value. Defaults to 0, indicating that no randomized delay shall be applied. Each timer unit will determine this delay - randomly each time it is started, and the delay will simply be + randomly before each iteration, and the delay will simply be added on top of the next determined elapsing time. This is useful to stretch dispatching of similarly configured timer events over a certain amount time, to avoid that they all fire @@ -237,6 +259,17 @@ AccuracySec=1us. + + OnClockChange= + OnTimezoneChange= + + These options take boolean arguments. When true, the service unit will be triggered + when the system clock (CLOCK_REALTIME) jumps relative to the monotonic clock + (CLOCK_MONOTONIC), or when the local system timezone is modified. These options + can be used alone or in combination with other timer expressions (see above) within the same timer + unit. These options default to false. + + Unit= @@ -250,7 +283,6 @@ suffix. - Persistent= @@ -282,7 +314,7 @@ RemainAfterElapse= Takes a boolean argument. If true, an elapsed - timer will stay loaded, and its state remains queriable. If + timer will stay loaded, and its state remains queryable. If false, an elapsed timer unit that cannot elapse anymore is unloaded. Turning this off is particularly useful for transient timer units that shall disappear after they first