Commit c8d6c459 authored by Christian Hesse's avatar Christian Hesse

packages-update: add random delay for scheduler

parent ecc28144
......@@ -42,8 +42,9 @@
:put "Do you want to (s)chedule reboot instead of (r)eboot now? [s/R]";
:if ([ :terminal inkey timeout=60 ] = 115) do={
/ system scheduler add name="reboot-for-update" start-time=03:00:00 interval=1d \
on-event="/ system scheduler remove reboot-for-update; / system reboot;"
:log info ("Scheduled reboot for update at 03:00.");
on-event=(":global RandomDelay; \$RandomDelay 3600; " . \
"/ system scheduler remove reboot-for-update; / system reboot;");
:log info ("Scheduled reboot for update between 03:00 and 04:00.");
:error ("Scheduled reboot.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment