Configuring Script Parameters

The 7705 SAR provides centralized script management for CLI scripts that are used by CRON and the Event Handling System (EHS). Scripts contain a set of CLI commands that are executed at a scheduled time or when an event is triggered.

The script and script-policy commands within the config>system>script-control context configure the script parameters.

The script command assigns a name to the script and references its location. When the script has been defined, a script-policy is configured that calls the previously configured script. The script-policy also specifies a location and filename that stores the results of the script run.

CLI Syntax:
config>system
    script-control
        script script-name [owner script-owner]
            description description-string
            location file-url
            no shutdown
        script-policy policy-name [owner policy-owner]
            expire-time {seconds | forever}
            lifetime {seconds | forever}
            max-completed unsigned
            results file-url
            script script-name [owner script-owner]
            no shutdown
Example:
config>system# script-control
config>system>script-control# script ‟test_script”
config>system>script-control>script# location "cf3:/test.txt"
config>system>script-control>script# no shutdown
config>system>script-control>script# exit
config>system>script-control# script-policy ‟test_policy”
config>system>script-control>script-policy# results "cf3:/script-results.txt"
config>system>script-control>script-policy# max-completed 4
config>system>script-control>script-policy# expire-time 7200
config>system>script-control>script-policy# no shutdown
config>system>script-control>script-policy# exit
config>system>script-control># exit

The following displays the configuration:

Dut-B>config>system>script-control# info
----------------------------------------------
            script "test_script"
                location "cf3:/test.txt"
                no shutdown
            exit
            script-policy "test_policy"
                results "cf3:/script-results.txt"
                script "test_script"
                max-completed 4
                expire-time 7200
                no shutdown
            exit
----------------------------------------------
Dut-B>config>system>script-control#