Skip to content

Commit d450630

Browse files
behrmannbluca
authored andcommitted
man: document how to properly use a target as the Unit= of a timer
1 parent ef90e8f commit d450630

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

man/systemd.timer.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@
4949

5050
<para>Note that in case the unit to activate is already active at the time the timer elapses it is not restarted,
5151
but simply left running. There is no concept of spawning new service instances in this case. Due to this, services
52-
with <varname>RemainAfterExit=</varname> set (which stay around continuously even after the service's main process
53-
exited) are usually not suitable for activation via repetitive timers, as they will only be activated once, and
54-
then stay around forever.</para>
52+
with <varname>RemainAfterExit=yes</varname> set (which stay around continuously even after the service's main
53+
process exited) are usually not suitable for activation via repetitive timers, as they will only be activated
54+
once, and then stay around forever. Target units, which by default do not deactivate on their own, can be
55+
activated repeatedly by timers by setting <varname>StopWhenUnneeded=yes</varname> on them. This will cause a
56+
target unit to be stopped immediately after its activation, if it is not a dependency of another running unit.</para>
5557
</refsect1>
5658

5759
<refsect1>

0 commit comments

Comments
 (0)