mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
packages-update: exit early if scheduler exists
This commit is contained in:
parent
59dc7e6d0c
commit
6b0c9ab17d
1 changed files with 5 additions and 0 deletions
|
|
@ -41,6 +41,11 @@
|
|||
/system/reboot;
|
||||
}
|
||||
|
||||
:if ([ /system/scheduler/find where name="_RebootForUpdate" ] > 0) do={
|
||||
$LogPrint warning $ScriptName ("Scheduler for reboot already exists.");
|
||||
:return false;
|
||||
}
|
||||
|
||||
:local Interval [ $IfThenElse ([ :totime $PackagesUpdateDeferReboot ] >= 1d) \
|
||||
$PackagesUpdateDeferReboot 1d ];
|
||||
:local StartTime [ :tostr [ :totime (10800 + [ $GetRandomNumber 7200 ]) ] ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue