Durable background jobs
on Cloudflare Workers
Enqueue, track, and observe background jobs that survive restarts. Built on Durable Objects with automatic retries, real-time status updates, and a dashboard to see it all.
// Enqueue a durable job
await fetch(`${SPACE_URL}/jobs`, {
method: "POST",
headers: { "Authorization": `Bearer ${TOKEN}` },
body: JSON.stringify({
name: "send-welcome-email",
payload: { userId: "usr_01J..." }
})
})How it works
HTTP API to enqueue
POST a job with a name, payload, and optional config. Get back an ID and a WebSocket URL for real-time progress.
Durable Object per job
Each job runs as its own Durable Object. State persists across restarts, and alarms handle timeouts and delivery.
Automatic retries
Failed jobs are retried with configurable max attempts. Jobs that exhaust retries are marked dead.
Real-time dashboard
Watch jobs flow through pending, running, completed, and failed states. WebSocket-powered, no polling.
Spaces and tokens
Organize jobs into spaces with scoped API tokens. Multi-tenant from the start.
Worker callbacks
Your worker gets called when a job is delivered. Complete it, fail it, or report progress — all via the API.