The ops run python command executes a script.
The ops stop process command stops a running OPS process.
Parameter | Description | Value |
---|---|---|
script-name |
Specifies the name of a script. |
The value is a string of 1 to 127 characters. |
arguments |
Specifies the script parameter, which is parsed by the script. |
The value is a string of 1 to 383 characters. |
process-id |
Process ID. |
IDs are automatically allocated by the system. You can run the display ops process state command to query the process ID. |
background |
Executes the script in the background. |
- |
Usage Scenario
To execute a script, run the ops run python command. Scripts can be executed in the foreground or background in the OPS.
User input is transparently transmitted to scripts, and the OPS does not proactively perform timeout tests.
If a script is executed in the foreground and a user closes the window, the script execution will be ended.
To stop a running process, run the ops stop process command.
Prerequisites
A script has been installed on the device.
The display ops process current command has been run to query the process ID.
Configuration Impact
If a script contains configuration delivering operations, the system configuration will be affected.
After a process is stopped, subsequent operations are no longer performed, and all resources applied for this process will be released.
Follow-up Procedure
Run the display ops process history command to view information about the stopped process. Information shows that a user cancels this process.
Precautions
The running process will be stopped suddenly. Therefore, exercise caution when running this command.