Documentation

Build background jobs with JobOrc

Plain-language guides for integrating the platform — not internal engineering specs.

Core concepts

Job

A durable unit of work: jobType (e.g. email.send), JSON payload, queue, status, and attempt history. Statuses include queued, running, retrying, succeeded, failed, cancelled.

Job type

Application-defined string. Workers register handlers keyed by the same string — treat it as a contract between producers and consumers.

Queue

Named lane inside a project (default, emails, orders-critical). Controls concurrency, visibility/lease timeout, optional rate limit, and pause/resume.

Attempt

Each worker run is an attempt. Retries increment until maxAttempts is exceeded.

Lease & heartbeat

Claiming a job issues a lease and visibility timeout. Call ctx.heartbeat() on long work. If the worker dies, the platform reclaims the job after the lease expires (at-least-once delivery).

Idempotency

Enqueue accepts an Idempotency-Key (SDK idempotencyKey, or auto-generated UUID). Same key + same fingerprint → safe replay. Same key + different payload → conflict. Use business keys for payments (charge:ord_123).

Retries & DLQ

Job retries are server-owned. Exhausted or non-retryable failures land in the dead-letter list for inspection and replay.

Schedule

Cron (or one-shot) resources that enqueue jobs on a cadence. Feature-flagged with JOBORC_FF_SCHEDULES (on by default when durable schedules are enabled).

Organization & project

Tenancy is organization → project. API keys and jobs are project-scoped. Set JOBORC_PROJECT_ID in the SDK. Never ship keys in browser bundles.