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.
Jobs are opaque payloads — lost on crash or redelivered as duplicates.
Jobs are workflows — journaled steps that resume exactly where they stopped.
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
Email Campaigns
Bulk email sends with batching, rate limiting, and progress tracking.
Scheduled Jobs
Recurring workflows with durable timers for daily reports and periodic tasks.
Retry with Backoff
Exponential backoff for external API calls with journaled retry state.
Content Processing
Multi-step file processing pipelines with parallel execution and checkpointing.
Best Practices
Guidelines for designing reliable background jobs, plus performance benchmarks.