2 minutes, If I do not remember wrong
I see your point of fear, the problem(s) will arise with this as you go:
online>update1 (offline)>online>wait 2 minutes, other systems starts to reconnect>update2 (offline)>online again
If you do it almost instantly after the first reboot, systems cant get crazy/distracted by the second reboot in the process of reconnecting.
But it depends, I do it this way in my smol homenet. At work, I update manually (there I refuse to use Ansible for my Linux servers too, because I had once updates installed via Ansible and the servers did not start after). So I see your point, but after all the years of flawless operation, I am sure this script works good. If the device cant do the upgrade, something more serious is broken imho.
Do not reboot the router to apply the update.
Of course, it only makes sense to reboot after the update if there's a notice about it in the changelog...
But I didn't write that the AI copied it badly from the forum,
I wrote that maybe in the next version MikroTik will change something,
as it continually does without respecting the past,
and that script could be a sword of Damocles...
examlple, CONCRETE example...
current-firmware = 7.25
upgrade-firmware = 7.25p
Yes ... if using multiple of 60 it may interfere with real-time clock ![]()
Joking of course. But there are real problems when using multiple (or integral fraction) of some other value. Example: electrical power, used on German, Austrian and Swiss railways, used to be 16⅔ Hz .. .because historically generators, used to generate "railway power", were mounted on same axles as generators for "utility power" (at 50Hz), but had different physical geometry ... hence ⅓ of frequency. But when they started to use rotary converters (50 Hz motor connected to 16⅔ Hz generator) this introduced uneven loading on motor rings (they used synchronous motors with electromagnets on rotors instead of permanent magnets). They solved the problem by defining nominal frequency of "railway power" to 16.7 Hz ... when 50 Hz motors are then set to operate at slightly higher rotary speed, the loading "wanders" between the 3 rings used and none get overheated.
Guard clause would be useful, something like (that I use)
:if ([/system resource get uptime] < 10m) do={
:log info "Notice: Sched: Uptime under 10m. Aborting."
:error "Boot settling phase active."
}
can bypass the 2m script execution time and give you enough leeway to set up the delay
For versions edge-case, adding a sanity check using scripts in Compare RouterOS version in script - RouterOS / Scripting - MikroTik community forum should be enough
