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.
HTTP executor
Section titled “HTTP executor”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.
Shell executor
Section titled “Shell executor”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.
Workflow executor
Section titled “Workflow executor”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.
Executor contract
Section titled “Executor contract”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
Current limits
Section titled “Current limits”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.
See also
Section titled “See also”- Reference: Embedding — registering workflow handlers
- Concepts: Policies — timeout and retry behavior