Script Jobs
Run scheduled scripts and long-running tasks through workspace executor connections.
Script jobs let TrigRun schedule, trigger, observe, and retry command-tier work that runs in your own infrastructure. TrigRun sends the command and metadata to a workspace executor, then records stdout, stderr, exit code, output, and failures on the execution.
Use callback or poll mode for long-running tasks. In those modes TrigRun parks the execution while the executor works, then resumes it when the executor calls back or when polling reports completion.
Create an executor
Create a workspace secret first if the executor requires auth:
Then register and test the executor:
The executor should expose:
| Endpoint | Method | Purpose |
|---|---|---|
/handshake | GET | Returns supported contract versions, modes, and auth methods. |
/execute | POST | Accepts script execution requests from TrigRun. |
Mounted volumes
If a script needs local files, mount those paths in your executor runtime. TrigRun sends the command and metadata to the executor; it does not mount host paths into TrigRun infrastructure.
For example, run the executor in your Docker, VM, or Kubernetes environment with /mnt/input and /mnt/output already mounted, then create a script job whose command references those container paths.
See Run Jobs With Mounted Volumes for a full Docker and Kubernetes example.
Create a script job
For a one-off run:
timeout-ms can be up to 7200000 milliseconds. For secret-bearing env vars, the executor connection must use bearer or hmac auth.