A script instance is a script configuration defining start / stop triggers
and a specific set of flags and arguments for it to be started with. Each
script instance can only run in at most one instance at any given time.
If the script instance is not running (state = finished|killed)
an error must be returned.
Params
attribute
description
script_name* string
The name of the script whose instance is to be stopped
The process ID (PID) of the execution. It must be set for scripts where state is either running or terminating. It must not be set for scripts in other states.
The trigger that stopped the execution. If the script was not stopped by a trigger or it did not execution yet, this field must not be set.
is_outdated bool
Indicates whether executed with a script source version that has been changed since.
Start Trigger
attribute
description
type* "manual"|"xpath"|"scheduler"
The type of the trigger
setting string
The configuration of the trigger: the xpath for xpath triggers or the crontab expression for scheduler triggers. Not applicable if the type is manual.
username string
The username of the user that started the script manually, only applicable if the type is manual.
Stop Trigger
attribute
description
type* "manual"|"xpath"|"scheduler"|"system"
The type of the trigger
setting string
The configuration of the trigger: the xpath for xpath triggers or the crontab expression for scheduler triggers. Not applicable if the type is manual or system.
username string
The username of the user that stopped the script manually, only applicable if the type is manual.
Scheduler trigger
A scheduler trigger's setting is a five-field crontab expression
(minute hour day-of-month month day-of-week), evaluated in the device's
local timezone. Example: 0 3 * * mon-fri.