signaloid-cli tasks delete
Delete a task.
Synopsis
signaloid-cli tasks delete --task-id <id>
Options
| Option | Required | Description |
|---|---|---|
--task-id <id> | Yes | Task ID to delete |
Description
Permanently deletes a task and all its associated data, including outputs. This action cannot be undone.
Examples
signaloid-cli tasks delete --task-id tsk_cbcfdc6736e84fd79b613f7793e653ce
Output:
{
"TaskID": "tsk_cbcfdc6736e84fd79b613f7793e653ce",
"deleted": true
}
Bulk deletion example:
# Delete all tasks older than 30 days
# `date -d` only available in Linux
CUTOFF=$(date -d '30 days ago' -u +"%Y-%m-%dT%H:%M:%SZ")
signaloid-cli tasks list --to $CUTOFF | jq -r '.Tasks[].TaskID' | \
while read TASK_ID; do
echo "Deleting task: $TASK_ID"
signaloid-cli tasks delete --task-id $TASK_ID
done
Notes
- This action is permanent and cannot be undone.
- All task data including outputs will be deleted.
- You must cancel a running task before you delete it. Deleting a running task fails, and the CLI exits with code
1(the API returns409). - The command is not idempotent. Deleting a task that is already deleted fails, and the CLI exits with code
4(the API returns404).
Troubleshooting
Deleting Running Tasks
Problem: You want to delete a task that is still running.
Solution: Cancel the task first with signaloid-cli tasks cancel --task-id $TASK_ID, then delete it. The delete command does not cancel a running task. The command fails, and the CLI exits with code 1 (the API returns 409).
See Also
- signaloid-cli tasks cancel - Cancel a running task
- signaloid-cli tasks list - List all tasks
- signaloid-cli tasks get - Get task details