Windmill · Arazzo Workflow
Windmill Run a Script with a Cancel Guard
Version 1.0.0
Run a script, inspect the job, and cancel it if it is still queued or running.
View Spec
View on GitHub
AutomationInternal ToolsOpen SourceProCode API CompositionScriptsWebhooksWorkflow EngineWorkflowsArazzoWorkflows
Provider
Workflows
run-script-with-cancel-guard
Run a script and cancel the job if it has not completed when inspected.
Starts an asynchronous script run, inspects the job, and either reads the completed result or cancels the still-pending job with a reason.
1
runScript
runScriptByPath
Submit an asynchronous run of the script by path. The response body is the new job UUID.
2
inspectJob
getJob
Read the job record. The type field discriminates a CompletedJob from a still-pending QueuedJob, which drives the cancel-or-read branch.
3
readCompleted
getCompletedJob
Read the completed job record when the run already finished.
4
cancelJob
cancelQueuedJob
Cancel the still-queued or running job with the supplied reason. The response body is a confirmation string.