Administrator Guide
Script Scheduler from EXEC mode
To trigger scripts to run periodically or based on an event, use the following commands.
• Schedule a script to run in EXEC mode.
Schedule a script to execute at a specific time and optionally stop after a specified time. By default,
the script runs in the foreground. To run the script in the background, use the bg parameter.
EXEC mode
script execute script-name [start {at | date-time | after time}] [stop {at
date-time | after time}] [bg] [arguments arg[..arg]] [username username]
Following example shows the script execution at 22:22 10/30/14 (MM/DD/YY) and stops after 1 hour
and runs the script in the background:
Dell#script execute collect_log.py start at 22:22-10/30/14 stop after
0001:0000 args "Te 0/5" bg
– Scheduled scripts can be unconfigured/stopped/killed/resumed only by the configured user (test)
or higher privileged user.
– In general, the Privilege level 15 (highest privilege user in Dell Networking OS CLI) user can
configure/reconfigure the explicit username in script execute CLI.
The following example shows how you can schedule the script named sample.zsh to start after one
hour and 12 minutes from now and runs the script in the background:
Dell#script execute sample.zsh start 01:12 bg
• Schedule a script to run periodically.
Schedule scripts to run at a certain time, to be repeated, to stop at a specified time or by a string of
arguments. This script runs in the background.
CONFIGURATION mode
script execute script-name [start {at date-time | after time}] [stop {at
date-time | after time}] [watch] [arguments arg[..arg]] [username username]
Following example shows the script execution at 22:22 (FTOS clock time) and stops after 15 minutes:
Dell(conf)#script execute monitor_status.pl start at 22:22 stop after 15
watch args "Te 0/4"
The keyword watch is used to monitor the script. If the script execution terminates before 10
minutes, the system will rerun the script.
• Executing a script based on event trigger.
Define an event to trigger scripts to run by a log event (for example, SYSLOG in Dell Networking OS), a
time-based event, or when CPU or memory usage reaches a predetermined percentage. The script
runs in the background.
CONFIGURATION mode
script trigger-event event-name {log-event [{tag—or—ex tags | tag-and-ex
tags}] [severity severity level]} | time-event {[start {at date-time | after
time}] [stop {at date-time | after time | count number}] [interval time]
Smart Scripting
87