Tasks & Runbooks
The Tasks feature lets you run scripts on hosts directly from the CT-Ops UI, and Runbooks provide a way to define reusable, multi-step operational procedures.
Custom Scripts
Custom scripts are shell commands or script files that run on a target host via the agent.
Creating a script
- Navigate to Tasks → Scripts
- Click New Script
- Enter a name, description, and the script content
- Select the target language / interpreter (
bash,sh,python3, etc.) - Click Save
Running a script
- From the Scripts list, click Run on any script
- Select the target host (or host group)
- Click Execute
The script runs on the target host(s) via the agent's shell check type. Output (stdout, stderr, exit code) streams back to the UI in real time.
Task Runs
Each script execution creates a task run record. The task runs page shows:
- Script name
- Target host
- Started at / completed at
- Exit code
- Truncated output preview
Click a task run to see the full stdout/stderr output.
Manual vs automated runs on a host
On the host detail page, the Tools section splits task history into two tabs:
- Tasks — runs you started yourself by clicking Run Script, Run Patch or Service. This is the place to find scripts you previously ran on a host.
- Logs — runs started automatically by CT-Ops on a schedule, such as software inventory scans. These share the same underlying execution mechanism, but are separated out so the Tasks list stays focused on your own activity.
Both tabs link through to the same task monitor view, so the full raw output is available regardless of which tab the run was started from.
Runbooks
Runbooks are a sequence of steps that can include:
- Script execution
- Manual confirmation prompts
- Condition checks
Runbooks are useful for standardising operational procedures — patch application, service restarts, environment health checks.
Creating a runbook
- Navigate to Tasks → Runbooks
- Click New Runbook
- Add steps in order:
- Script step — runs a script on one or more hosts
- Approval step — pauses execution and waits for a human to confirm before continuing
- Click Save
Running a runbook
- Click Run on any runbook
- Select the target hosts or host group
- Click Start
Runbook progress is tracked step by step. If an approval step is reached, an in-app notification is sent to the configured approvers.
Patch Management
The task runner integrates with the host's package manager. From the Tasks tab on a host detail page you can:
- List available package updates
- Apply selected updates
- View update history
This is equivalent to running apt upgrade or yum update but tracked and audited through CT-Ops.