Task scheduler — allows scheduled task execution. Together with Configuration_scripting this can be used for automating configuration. Note that scripts excecuted this way are executed as root user - this may be dangerous.
system task-scheduler task <name> cron-spec <UNIX cron time spec> executable arguments <arguments string> path <path to executable> interval <int32>[mhd]
system task-scheduler task mytask interval 2h executable path /config/scripts/mytask arguments "arg1 arg2 arg3" task anothertask cron-spec "* * * 1 *" executable path /config/scripts/anothertask
set system task-scheduler task <name> interval <value><suffix>
Sets the task to execute every N minutes, hours, or days. Suffixes:
- m — minutes
- h — hours
- d — days
If suffix is omitted, minutes are implied.
Run every five minutes:
set system task-schedule task TEST interval 5
set system task-schedule task TEST interval 5m
Run every two hours:
set system task-schedule task TEST interval 2h
Run every 7 days:
set system task-schedule task TEST interval 7d
This is usual UNIX cron time spec. For the cases "interval" is not enough.
set system task-scheduler task TEST cron-spec "* * * 1 *"
Path and arguments of the executable to run.
set system task-schedule task TEST executable path /config/scripts/myscript set system task-schedule task TEST executable arguments "arg1 arg2"
This feature has no operational mode commands.