Run a Script and Clean up its Job
A 4-step recipe with Windmill. We can help you get access.
Recipe · 4 steps
Run a Script and Clean up its Job
with Windmill
Run a script, await and capture its result, then delete the job record.
- Submit an asynchronous run of the script by path. The response body is the new job UUID.
- Poll the completed-result-maybe endpoint, looping back while the completed flag is false and proceeding once the job has finished.
- Read the full completed job to capture the result and success flag before the record is purged.
- Delete the completed job record to remove its args, result and logs.
What you'll need to have ready
- token: Windmill API token presented as a Bearer credential.
- workspace: The Windmill workspace id.
- path: The script path to run.
- args: The argument map passed to the script.
For your developer
Arazzo workflow windmill:run-script-and-cleanup-job, 4 operations: runScriptByPath → getCompletedJobResultMaybe → getCompletedJob → deleteCompletedJob. Specs on APIs.io.