man: document how to properly use a target as the Unit= of a timer

This commit is contained in:
Joerg Behrmann 2023-11-30 11:01:16 +01:00 committed by Luca Boccassi
parent ef90e8f9db
commit d4506301f9

View file

@ -49,9 +49,11 @@
<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>