Owner's Manual
Smart Scripting | 59
This example shows how you can schedule the script named “hello.txt” to start the execution immediately and stop
after 20 minutes:
Dell#script execute hello.tcl start now stop after 00:20 args "hi" username test
• Scheduled scripts can be un-configured/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
Define a trigger event.
script trigger-event
event-name {log-event {tag tag}
| severity severity level} |
time-event time | cpu-usage
percentage | mem-usage
percentage}
CONFIGURATION Define an event to use 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
pre-determined percentage. The script runs in the
background.
This example shows how you can define the event to trigger a script when a SYSLOG event with pattern
“OSTATE_UP” occurs:
Dell(conf)#script trigger-event event1 log-event tag “OSTATE_UP”
Schedule a script to run based on defined events.
script execute script-name
[concurrent] triggered-by
event-name [args arguments]
[username username]
CONFIGURATION Schedule a script to run triggered by a defined trigger
event.
This example shows how you can schedule the script named “sample.pl” to run concurrently when trigger event
named “event1” takes place:
Dell(conf)#script execute sample.pl concurrent triggered-by event1 args “hi” username “user1”
Where event1 is defined by a trigger event:
• If the trigger is associated with a script on Concurrent mode, a new instance of the script is spawned
at every occurrence of the event. Note: This is limited to a maximum of 10 instances at any given
time and further events are ignored.
• If the trigger is associated with a script on Singleton mode, a new instance of the script is not created
at every occurrence of the event, if it is already running. The default mode is Singleton.
Command Syntax Command Mode Task