]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd.timer.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[thirdparty/systemd.git] / man / systemd.timer.xml
index dcd7b90ee53c3d0127128a76447e96d0b8c32d4f..5b1bc8b5217e06757135da6d336f6014892f7be4 100644 (file)
@@ -3,6 +3,8 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
+  SPDX-License-Identifier: LGPL-2.1+
+
   This file is part of systemd.
 
   Copyright 2010 Lennart Poettering
     <filename>foo.timer</filename> activates a matching service
     <filename>foo.service</filename>. The unit to activate may be
     controlled by <varname>Unit=</varname> (see below).</para>
+
+    <para>Note that in case the unit to activate is already active at the time the timer elapses it is not restarted,
+    but simply left running. There is no concept of spawning new service instances in this case. Due to this, services
+    with <varname>RemainAfterExit=</varname> set (which stay around continuously even after the service's main process
+    exited) are usually not suitable for activation via repetitive timers, as they will only be activated once, and
+    then stay around forever.</para>
   </refsect1>
 
   <refsect1>
-    <title>Automatic Dependencies</title>
-
-    <para>Timer units automatically gain a <varname>Before=</varname>
-    dependency on the service they are supposed to activate.</para>
-
-    <para>Unless <varname>DefaultDependencies=</varname> is set to
-    <option>false</option>, all timer units will implicitly have
-    dependencies of type <varname>Requires=</varname> and
-    <varname>After=</varname> on <filename>sysinit.target</filename>,
-    a dependency of type <varname>Before=</varname> on
-    <filename>timers.target</filename>, as well as
-    <varname>Conflicts=</varname> and <varname>Before=</varname> on
-    <filename>shutdown.target</filename> to ensure that they are
-    stopped cleanly prior to system shutdown.  Timer units with at
-    least one <varname>OnCalendar=</varname> directive will have an
-    additional <varname>After=</varname> dependency on
-    <filename>timer-sync.target</filename> 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 <varname>DefaultDependencies=</varname> option.</para>
+    <title>Implicit Dependencies</title>
+
+    <para>The following dependencies are implicitly added:</para>
+
+    <itemizedlist>
+      <listitem><para>Timer units automatically gain a <varname>Before=</varname>
+      dependency on the service they are supposed to activate.</para></listitem>
+    </itemizedlist>
+  </refsect1>
+
+  <refsect1>
+    <title>Default Dependencies</title>
+
+    <para>The following dependencies are added unless <varname>DefaultDependencies=no</varname> is set:</para>
+
+    <itemizedlist>
+      <listitem><para>Timer units will automatically have dependencies of type <varname>Requires=</varname> and
+      <varname>After=</varname> on <filename>sysinit.target</filename>, a dependency of type <varname>Before=</varname>
+      on <filename>timers.target</filename>, as well as <varname>Conflicts=</varname> and <varname>Before=</varname> on
+      <filename>shutdown.target</filename> 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
+      <varname>DefaultDependencies=</varname> option.</para></listitem>
+
+      <listitem><para>Timer units
+      with at least one <varname>OnCalendar=</varname> directive will have an additional <varname>After=</varname>
+      dependency on <filename>time-sync.target</filename> to avoid being started before the system clock has been
+      correctly set.</para></listitem>
+    </itemizedlist>
   </refsect1>
 
   <refsect1>
         <para>Note that timers do not necessarily expire at the
         precise time configured with this setting, as it is subject to
         the <varname>AccuracySec=</varname> setting
-        below.</para></listitem>
+        below.</para>
+
+       <para>May be specified more than once.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         it unlikely that they fire simultaneously. If
         <varname>RandomizedDelaySec=</varname> and
         <varname>AccuracySec=</varname> are used in conjunction, first
-        the a randomized time is added, and the result is then
-        possibly shifted further to coalesce it with other timer
-        events possibly happening on the system. As mentioned above
+        the randomized delay is added, and then the result is
+        possibly further shifted to coalesce it with other timer
+        events happening on the system. As mentioned above
         <varname>AccuracySec=</varname> defaults to 1min and
         <varname>RandomizedDelaySec=</varname> to 0, thus encouraging
         coalescing of timer events. In order to optimally stretch
         during the time when the timer was inactive. This is useful to
         catch up on missed runs of the service when the machine was
         off. Note that this setting only has an effect on timers
-        configured with <varname>OnCalendar=</varname>.
+        configured with <varname>OnCalendar=</varname>. Defaults
+        to <varname>false</varname>.
         </para></listitem>
       </varlistentry>
 
         unloaded. Turning this off is particularly useful for
         transient timer units that shall disappear after they first
         elapse. Note that this setting has an effect on repeatedly
-        starting the a timer unit that only elapses once: if
+        starting a timer unit that only elapses once: if
         <varname>RemainAfterElapse=</varname> is on, it will not be
         started again, and is guaranteed to elapse only once. However,
-        if <varname>RemainAfterLeapse=</varname> is off, it might be
+        if <varname>RemainAfterElapse=</varname> is off, it might be
         started again if it is already elapsed, and thus be triggered
         multiple times. Defaults to
         <varname>yes</varname>.</para></listitem>