mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
README: add valid script to scheduler
This commit is contained in:
parent
1ee3213e02
commit
e479f3b01a
2 changed files with 8 additions and 8 deletions
12
README.md
12
README.md
|
@ -96,8 +96,8 @@ And finally load configuration and functions and add the schedulers.
|
||||||
|
|
||||||
[admin@MikroTik] > / system script run global-config
|
[admin@MikroTik] > / system script run global-config
|
||||||
[admin@MikroTik] > / system script run global-functions
|
[admin@MikroTik] > / system script run global-functions
|
||||||
[admin@MikroTik] > / system scheduler add name=global-config start-time=startup on-event=global-config
|
[admin@MikroTik] > / system scheduler add name="global-config" start-time=startup on-event="/ system script run global-config;"
|
||||||
[admin@MikroTik] > / system scheduler add name=global-functions start-time=startup on-event=global-functions
|
[admin@MikroTik] > / system scheduler add name="global-functions" start-time=startup on-event="/ system script run global-functions;"
|
||||||
|
|
||||||
Updating scripts
|
Updating scripts
|
||||||
----------------
|
----------------
|
||||||
|
@ -112,7 +112,7 @@ Adding a script
|
||||||
To add a script from the repository create a configuration item first, then
|
To add a script from the repository create a configuration item first, then
|
||||||
update scripts to fetch the source.
|
update scripts to fetch the source.
|
||||||
|
|
||||||
[admin@MikroTik] > / system script add name=check-routeros-update
|
[admin@MikroTik] > / system script add name="check-routeros-update"
|
||||||
[admin@MikroTik] > / system script run script-updates
|
[admin@MikroTik] > / system script run script-updates
|
||||||
|
|
||||||
Scheduler and events
|
Scheduler and events
|
||||||
|
@ -123,16 +123,16 @@ Most scripts are designed to run regularly from
|
||||||
added `check-routeros-update`, so let's run it every hour to make sure not to
|
added `check-routeros-update`, so let's run it every hour to make sure not to
|
||||||
miss an update.
|
miss an update.
|
||||||
|
|
||||||
[admin@MikroTik] > / system scheduler add name=check-routeros-update interval=1h on-event=check-routeros-update
|
[admin@MikroTik] > / system scheduler add name="check-routeros-update" interval=1h on-event="/ system script run check-routeros-update;"
|
||||||
|
|
||||||
Some events can run a script. If you want your DHCP hostnames to be available
|
Some events can run a script. If you want your DHCP hostnames to be available
|
||||||
in DNS use `dhcp-to-dns` with the events from dhcp server. For a regular
|
in DNS use `dhcp-to-dns` with the events from dhcp server. For a regular
|
||||||
cleanup add a scheduler entry.
|
cleanup add a scheduler entry.
|
||||||
|
|
||||||
[admin@MikroTik] > / system script add name=dhcp-to-dns
|
[admin@MikroTik] > / system script add name="dhcp-to-dns"
|
||||||
[admin@MikroTik] > / system script run script-updates
|
[admin@MikroTik] > / system script run script-updates
|
||||||
[admin@MikroTik] > / ip dhcp-server set lease-script=dhcp-to-dns [ find ]
|
[admin@MikroTik] > / ip dhcp-server set lease-script=dhcp-to-dns [ find ]
|
||||||
[admin@MikroTik] > / system scheduler add name=dhcp-to-dns interval=5m on-event=dhcp-to-dns
|
[admin@MikroTik] > / system scheduler add name="dhcp-to-dns" interval=5m on-event="/ system script run dhcp-to-dns;"
|
||||||
|
|
||||||
There's much more to explore... Have fun!
|
There's much more to explore... Have fun!
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
run global-functions;
|
run global-functions;
|
||||||
}
|
}
|
||||||
/ system scheduler {
|
/ system scheduler {
|
||||||
add name=global-config start-time=startup on-event=global-config;
|
add name="global-config" start-time=startup on-event="/ system script run global-config;";
|
||||||
add name=global-functions start-time=startup on-event=global-functions;
|
add name="global-functions" start-time=startup on-event="/ system script run global-functions;";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue