Runs & Schedules
client.runs and client.schedules — execute workflows, poll status, read outputs, and manage schedules.
On this page6
client.runs
| Method | Description |
|---|---|
execute(workflowId, options?) | Start a run (full workflow or single node) |
get(executionId, options?) | Run status + per-node statuses |
list(workflowId?, options?) | Auto-paginated runs |
listPage(workflowId?, options?) | One page of runs |
stop(executionId, options?) | Stop a running execution |
retry(executionId, options?) | Retry a failed run |
delete(executionId, options?) | Remove run record |
getOutputContent(outputId, maxBytes?, options?) | Read output file bytes as string |
getNodeOutputFiles(executionId, nodeName, options?) | List artifacts for a node |
listSubjobs(executionId, options?) | Subjob generator |
listSubjobsPage(executionId, options?) | Subjobs page |
getSubjobConsole(executionId, subjobId, stream?, mode?, options?) | stdout/stderr console |
findSubjobByNodeName(executionId, nodeName, options?) | Lookup subjob by node |
Execute options
const run = await client.runs.execute(workflowId, {
fleet: 'Managed fleet', // fleet name or id
inputs: { domain: 'example.com' }, // input overrides
node: 'httpx', // single-node partial run
partialExecution: { /* … */ }, // advanced upstream selection
})Poll until complete
let current = await client.runs.execute(workflowId, {
inputs: { target: 'example.com' },
})
while (current.status === 'RUNNING' || current.status === 'PENDING') {
await new Promise((r) => setTimeout(r, 5000))
current = await client.runs.get(current.id)
}
if (current.status === 'COMPLETED') {
const files = await client.runs.getNodeOutputFiles(current.id, 'httpx')
console.log(files)
}Read output content
const content = await client.runs.getOutputContent(outputId, 1024 * 1024)client.schedules
| Method | Description |
|---|---|
list(options?) | AsyncGenerator<Schedule> |
get(id, options?) | Schedule details |
create(data, options?) | Create schedule |
delete(id, options?) | Delete |
enable(id, options?) | Enable |
disable(id, options?) | Disable |
create expects fields such as workflow, fleet, date, repeat_period, parallelism — run CreateSchedule type in your IDE or see package types.
const schedule = await client.schedules.create({
workflow: workflowId,
fleet: fleetId,
date: '2026-06-15T06:00:00Z',
repeat_period: 86400,
parallelism: 1,
})