Skip to main content

Tasks

Tasks are scripts or individual commands sent to a Target. You need to create Targets before you can run Tasks.

The Task Object#

created#

The creation date of the Task

message#

An optional message gives an overview of the task motivations. It will help the reviewer to understand and speed up the review workflow, besides being a great documentation resource.

script#

Script or individual command.

Examples:

#bash
curl -i https://api.runops.io
#python
import os
print(os.environ['RUNOPS_CONFIG'])

type#

Type of the script. Inherited from the Target by default, but can be overwritten on creation.

target#

Targets define the Agent where scripts execute, the Secrets they need, PII data removal, review workflows, and many other contextual authorization rules.

review#

If the Target requires reviews this field will provide the details about the status of the reviews for each group and when they happened.

status#

Status tells where a Task is in it's lifecycle.

drawing
StatusDescription
createdThe initial state of a task. Every task starts in the created state.
pending-reviewWhen the review workflow starts the task goes to the pending-review state.
approvedAfter the review workflow, if the task got all the required approvals, it goes to the approved state.
rejectedif one of the s rejects the task it goes to the rejected state. You need to incorporate the feedback left by the reviewer in Slack or other channel and create a new task.
readyAfter approval, user will Run the task, after the run action is triggered, the task goes to the ready state, so the Agent can pick and execute it.
runningAfter the agent picks the task, it locks the task to the running state, so no other process can execute it again.
successWhen task finishes running, it goes to the end state: success. After the task is finished, you can Get logs from a task
failureWhen task finishes running with a error, it goes to the failure state. You can Get logs from a task to understand what went wrong
killedWhen a task receives a kill command to interrupt its execution.