mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-21 08:29:33 +00:00
global-functions: make the scheduler fix a block
This commit is contained in:
parent
b7a5402be6
commit
74be3eae5d
1 changed files with 8 additions and 6 deletions
|
|
@ -1921,12 +1921,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# add (and fix) global scripts scheduler
|
# add (and fix) global scripts scheduler
|
||||||
:local OnEvent "/system/script { run global-config; run global-functions; }";
|
/system/scheduler {
|
||||||
:if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
|
:local OnEvent "/system/script { run global-config; run global-functions; }";
|
||||||
/system/scheduler/add name="global-scripts" start-time=startup;
|
:if ([ :len [ find where name="global-scripts" ] ] = 0) do={
|
||||||
}
|
add name="global-scripts" start-time=startup;
|
||||||
:if ([ /system/scheduler/get "global-scripts" on-event ] != $OnEvent) do={
|
}
|
||||||
/system/scheduler/set "global-scripts" on-event=$OnEvent;
|
:if ([ get "global-scripts" on-event ] != $OnEvent) do={
|
||||||
|
set "global-scripts" on-event=$OnEvent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Log success
|
# Log success
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue