From acf24a1a84e9496e3feb09449f4cc43fe67a9a64 Mon Sep 17 00:00:00 2001 From: Kristijan Gjoshev Date: Sat, 1 Feb 2020 18:27:08 +0100 Subject: timer: add new feature FixedRandomDelay= FixedRandomDelay=yes will use `siphash24(sd_id128_get_machine() || MANAGER_IS_SYSTEM(m) || getuid() || u->id)`, where || is concatenation, instead of a random number to choose a value between 0 and RandomizedDelaySec= as the timer delay. This essentially sets up a fixed, but seemingly random, offset for each timer iteration rather than having a random offset recalculated each time it fires. Closes #10355 Co-author: Anita Zhang --- man/systemd.timer.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'man/systemd.timer.xml') diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml index 24c6dd50f8..c4698bf4dc 100644 --- a/man/systemd.timer.xml +++ b/man/systemd.timer.xml @@ -268,6 +268,18 @@ AccuracySec=1us. + + FixedRandomDelay= + + Takes a boolean argument. If true, some amount of time between 0 and + RandomizedDelaySec= 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 RandomizedDelaySec= 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 + RandomizedDelaySec= is set to 0. Defaults to . + + OnClockChange= OnTimezoneChange= -- cgit v1.2.1