Robust job processing in Elixir, backed by modern PostgreSQL, MySQL, and SQLite3
open coreApache-2.0self-hostablefree
Oban is a background job library for Elixir that stores jobs in the application's SQL database through Ecto, with engines for PostgreSQL, MySQL and SQLite3. Jobs can be enqueued atomically with other database changes, and completed jobs are kept for historic metrics and inspection. It has isolated queues with their own concurrency limits, runtime queue control across nodes without distributed Erlang, cancelling running jobs, unique jobs, scheduled and cron jobs that never double-enqueue across nodes, priorities and Telemetry events. Oban Web is an Apache-licensed LiveView dashboard; Oban Pro, a paid licensed package, adds workflows, batches, global concurrency and rate limiting, and queue partitioning. A separate Oban for Python is also available.
Problems it solves
- background jobs in Elixir backed by Postgres
- cron-style recurring jobs in Elixir that don't run twice when I have several nodes
- enqueue a job in the same Ecto transaction as the database changes it depends on
- jobs that are enqueued in the same database transaction as the record they process
- keep a history of completed and failed jobs to inspect later
- cancel a job that's already running on another node
- pause and scale queues at runtime across every node on Heroku without clustering
- a live dashboard for job queues inside my Phoenix app
- retry failed jobs with backoff and see them in a dashboard
- stop duplicate jobs with the same arguments being queued within a time window
- rate limit jobs globally across a cluster to respect an API quota
- jobs that depend on other jobs, with fan-out and fan-in
- a Postgres-backed job queue for Python with workflows
- a job queue for an Elixir app on SQLite or MySQL
Features
- transactional enqueueing
- isolated queues with per-queue concurrency
- every job in its own process
- runtime queue control across nodes
- job cancelling
- triggered execution via insert triggers
- unique jobs
- scheduled jobs
- periodic (cron) jobs without duplicates across nodes
- ten priority levels
View 6 more
- retained jobs for historic metrics
- node metrics
- graceful shutdown
- Telemetry integration
- Oban Web dashboard (LiveView)
- Pro: workflows, batches, global concurrency and rate limiting, queue partitioning, encrypted args, decorator
Capabilities
| Has an API | plan not known |
|---|---|
| Takes plugins | plan not known |
| Has official SDKs | plan not known |
What people say
- Peter Ullrich (IndieCourses): "Oban is probably the greatest library I have ever used, especially with Pro on top." source
Alternatives
The same job
These do what Oban does.
- River Fast and reliable background jobs
- Sidekiq Simple, efficient background processing for Ruby
- Temporal Durable execution platform for reliable workflows
- Celery Distributed task queue for Python, with real-time processing and scheduling
- Hatchet An orchestration engine for background tasks, AI agents, and durable workflows