Getting Started

Background Jobs & Async Task Processing


Most applications need to run work outside the request cycle — sending emails, generating reports, processing uploads, syncing with external APIs, or cleaning up stale data. A plain job queue hands a job to a worker, but it doesn't remember how far the job got: a crash halfway through means starting again or writing your own checkpoints, and retry logic is yours to build. Orcher runs background work as durable workflows backed by PostgreSQL, so a job resumes from its last completed step.

One database instead of a queue stack

A background-job setup usually accretes parts: a queue, workers for it, a scheduler for recurring work, and retry bookkeeping scattered through application tables. A workflow engine collapses them into things you already run.

The Job Queue, Replaced
Queue stack
Redis + job queue
queue workers
cron / scheduler
retry state in your tables

Jobs are opaque payloads — lost on crash or redelivered as duplicates.

Orcher
your app + embedded worker
PostgreSQL
queue · timers · retry state · journal — all in one place

Jobs are workflows — journaled steps that resume exactly where they stopped.

The schedule, the queue, and the retry state live in a database you already operate.

Every job leaves a trail

Because a job is a workflow, it isn't an opaque payload in a queue — it's a sequence of journaled steps. If a 10,000-email campaign crashes at batch 37, it resumes at batch 37, and the journal doubles as a progress report you can query mid-run. Rate limiting, batching, and backoff aren't queue configuration — they're regular code. Scheduling doesn't need cron — durable timers survive restarts and deploys.


Patterns