scheduler
system/scheduler
Type: Directory
Scheduler entries run RouterOS commands or a /system/script entry at a set date and time, repeatedly at an interval, during startup, or on selected weekdays. See the Scheduler guide for examples and for how the next run is calculated. The reset command clears on-event and sets interval to 0s; it does not reset run-count.
| Flag | Name | Description |
|---|---|---|
| X | disabled | Disabled entry; it does not run until enabled. |
| Argument | Type | Description |
|---|---|---|
| name ( mandatory ) | string | Name of the entry. Log messages from its runs refer to it as scheduler:<name>. |
| start-date | date | Date of the first run, in the format YYYY-MM-DD (years 1970..2106). Default: the date when the entry is added. |
| start-time | alt { startup: enum (startup) { startup:0xffffffff } , time: date } | Time of the first run:
Startup runs happen before interfaces are up and before the DHCP client has an address. Default: the time when the entry is added. |
| days ( unset ) | alt { day: enum (never | always) { never:0, always:127 } , day: ubit (sun, mon, tue, wed, thu, fri, sat) } | Weekdays on which the entry runs:
An |
| interval | time | Time between runs. Runs happen at start-date and start-time plus whole multiples of the interval, so a start in the past aligns the schedule: start-time=00:00:00 interval=1h runs on every full hour. 0s runs the entry once at start-date and start-time (with days set, once on each matching day). Default: 0s. |
| on-event | alt { script: string } | RouterOS commands to run, or the name of a /system/script entry. A script called by name runs with this entry's policy; it is refused with not enough permissions when the script's own policy has rights this entry's policy lacks. Default: empty. |
| policy | multi { array-id, policy: enum } | Policies the commands run with. Commands that need a missing policy fail with not enough permissions (9) in the log. See script permissions. Default: the policies of the user who adds the entry, limited to ftp, reboot, read, write, policy, test, password, sniff, sensitive and romon. |
| Read-only Argument | Type | Description |
|---|---|---|
| owner | string | The user who added the entry. |
| run-count | num | Number of runs since the last startup. A reboot resets it to 0. |
| next-run | date | Date and time of the next run. Empty when no run is pending: an entry with interval=0s after its run, a startup entry with interval=0s, or an entry with days=never. |