Merge pull request #17497 from anitazha/randomizeonce
timer: add new feature FixedRandomDelay=
This commit is contained in:
+16
-4
@@ -268,6 +268,18 @@
|
||||
<varname>AccuracySec=1us</varname>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>FixedRandomDelay=</varname></term>
|
||||
|
||||
<listitem><para>Takes a boolean argument. If true, some amount of time between 0 and
|
||||
<varname>RandomizedDelaySec=</varname> is chosen and added as the delay for each timer iteration. As this
|
||||
delay will not be recalculated on each run, this effectively creates a fixed offset for each iteration.
|
||||
The distribution between 0 and <varname>RandomizedDelaySec=</varname> is deterministic and based on
|
||||
a combination of the machine ID, whether the timer is run by the user/system manager, the service manager's
|
||||
user ID, and the timer's unit name. Has no effect if
|
||||
<varname>RandomizedDelaySec=</varname> is set to 0. Defaults to <option>false</option>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>OnClockChange=</varname></term>
|
||||
<term><varname>OnTimezoneChange=</varname></term>
|
||||
@@ -276,7 +288,7 @@
|
||||
when the system clock (<constant>CLOCK_REALTIME</constant>) jumps relative to the monotonic clock
|
||||
(<constant>CLOCK_MONOTONIC</constant>), 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.</para></listitem>
|
||||
unit. These options default to <option>false</option>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
@@ -301,7 +313,7 @@
|
||||
is nonetheless subject to the delay imposed by <varname>RandomizedDelaySec=</varname>.
|
||||
This is useful to catch up on missed runs of the service when the system was powered down. Note that
|
||||
this setting only has an effect on timers configured with <varname>OnCalendar=</varname>. Defaults to
|
||||
<varname>false</varname>.</para>
|
||||
<option>false</option>.</para>
|
||||
|
||||
<para>Use <command>systemctl clean --what=state …</command> on the timer unit to remove the timestamp
|
||||
file maintained by this option from disk. In particular, use this command before uninstalling a timer
|
||||
@@ -317,7 +329,7 @@
|
||||
from suspend, should it be suspended and if the system supports this. Note that this option will only
|
||||
make sure the system resumes on the appropriate times, it will not take care of suspending it again
|
||||
after any work that is to be done is finished. Defaults to
|
||||
<varname>false</varname>.</para>
|
||||
<option>false</option>.</para>
|
||||
|
||||
<para>Note that this functionality requires privileges and is thus generally only available in the
|
||||
system service manager.</para>
|
||||
@@ -343,7 +355,7 @@
|
||||
<varname>RemainAfterElapse=</varname> is on, starting the timer a second time has no effect. However,
|
||||
if <varname>RemainAfterElapse=</varname> is off and the timer unit was already unloaded, it can be
|
||||
started again, and thus the service can be triggered multiple times. Defaults to
|
||||
<varname>yes</varname>.</para></listitem>
|
||||
<option>true</option>.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
Reference in New Issue
Block a user