<< Click to Display Table of Contents >> Navigation: Actions > Task Commands > Task status |
This action reads the status of a specified task and writes it into a variable. The value can be a number from 0 to 4 or as a string:
•Manual – (0). A task without triggers or with switched off triggers in the idle mode. It is possible to run the task manually or from another task.
•Idle – (1). A task is in the idle mode and has active triggers. It is possible both running manual and automatically when trigger starts the task.
•Disabled – (2). A task is busy, it is in the edit mode. The task cannot be started.
•Running – (3). The task is in progress. A restart is possible only after the task is completed.
•Stopping – (4). A task has got the signal to stop and is waiting for the end of the active step. The task will be stopped only after the end of the active step.
Task to Check
Tasks can be defined in three ways:
•Explicitly – You explicitly select the task from the list of available tasks.
•By Task ID – You can specify the task ID explicitly or through a variable. You can also select the task from the list of available tasks. The Task ID is a formal number assigned to the task upon creation or import. You cannot change it.
•By external name – You can specify the External name of the task explicitly or through a variable. You can also select the task from the list of available tasks. The External name is an alternative ID for the task. You can change it at your discretion in the task editor.
The "By Task ID" and "By external name" modes are convenient for batch processing tasks in a loop (e.g., starting and stopping a group of tasks, checking the status, etc.).
Save Status to Variable
Specify the name of the variable in which the status must be saved.
Save status as
Integer value – is a status as an integer number from 0 to 4.
String value – is a status as a string: Manual, Idle, Disabled, Running, Stopping
Related Topics