A TypeScript job scheduler for Node.js with pluggable MongoDB, PostgreSQL, or Redis backends, cron and human-readable schedules, and optional real-time notifications.
Overview
Agenda schedules background work inside Node.js applications. Each agenda instance connects to a pluggable backend that stores job documents, polls or listens for work, and runs defined processors with concurrency, locking, and priority controls.
Version six is ESM-only for modern Node releases and separates storage packages such as the official MongoDB, PostgreSQL, and Redis backends. You define job handlers, then schedule one-off, delayed, or repeating runs using cron strings or phrases like "in 5 minutes". Automatic retry with constant, linear, or exponential backoff, debouncing, pause and resume, and sandboxed fork mode cover common queue patterns.
Optional notification channels—including in-memory channels, Redis pub/sub, PostgreSQL LISTEN/NOTIFY, or MongoDB change streams—can wake workers immediately instead of waiting for the next poll interval. Companion packages add a REST API and a web dashboard for operations teams.
Agenda compares itself to other Node queues on persistence, repeat jobs, sandboxed workers, human-readable intervals, long-running jobs, and built-in REST and UI options.
Key features
- Pluggable storage backends
- Cron and human-readable schedules
- Configurable concurrency and locks
- Automatic retry with backoff
- Real-time notification channels
- Pause, resume, and debouncing
- Sandboxed worker fork mode
- TypeScript decorator-based jobs
Use cases
- Recurring email or report jobs
- Delayed task execution
- Distributed worker pools
- Long-running background processing
- Ops dashboards via Agendash