Skip to content

Executors

An executor performs the actual work for a run. Wakeplane ships three executor types. The target type is declared on the schedule; the dispatcher routes to the correct executor at dispatch time.

Makes an HTTP request to a URL.

{
"target_type": "http",
"target": {
"url": "https://internal.example.com/hooks/daily-report",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": "{\"triggered_by\": \"wakeplane\"}"
}
}

The executor records the response status, body (truncated), and latency in the run receipt.

Runs a shell command.

{
"target_type": "shell",
"target": {
"command": "/usr/local/bin/run-report.sh",
"args": ["--env", "production"],
"timeout": "5m"
}
}

Stdout/stderr are captured in the run receipt. The exit code determines run state.

Calls an in-process Go function registered in the workflow registry.

app.RegisterWorkflow("generate-report", func(ctx context.Context, payload []byte) error {
return generateReport(ctx, payload)
})
{
"target_type": "workflow",
"target": {
"name": "generate-report",
"payload": "{}"
}
}

Workflow handlers must be registered at startup. Dynamic or out-of-process loading is not supported in v0.1.

All executors:

  • Run only after a durable claim exists
  • Respect the run context for cancellation
  • Record a result and receipt before the dispatcher transitions run state
  • Do not modify schedule or occurrence state directly

Workflow handlers that ignore ctx.Done() are non-cooperative. The dispatcher enforces a timeout boundary and reports remaining active workers on shutdown. The caller decides whether to wait or let process supervision handle termination.