]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: document how to properly use a target as the Unit= of a timer
authorJoerg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 30 Nov 2023 10:01:16 +0000 (11:01 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 30 Nov 2023 17:14:31 +0000 (17:14 +0000)
man/systemd.timer.xml

index 59215dc72a1d4a1ca4a2f651f13263ea42dd9e7b..e5af7c01a4938cdec75534f1688cbe1febd58d13 100644 (file)
 
     <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>
+    with <varname>RemainAfterExit=yes</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. Target units, which by default do not deactivate on their own, can be
+    activated repeatedly by timers by setting <varname>StopWhenUnneeded=yes</varname> on them. This will cause a
+    target unit to be stopped immediately after its activation, if it is not a dependency of another running unit.</para>
   </refsect1>
 
   <refsect1>