Job FrameworksOpen SourceJavaScript

Agenda

MongoDB-backed job scheduler for Node.js

What is Agenda?

Agenda is a job scheduling library for Node.js that stores job definitions and state in MongoDB. Unlike in-memory schedulers, Agenda persists all job data to the database, meaning scheduled jobs survive process restarts and can be managed across multiple application instances. It supports cron-style scheduling, one-time delayed jobs, and recurring intervals.

Agenda provides a rich API for defining jobs, scheduling them, and handling lifecycle events (start, complete, fail). It includes built-in concurrency control to limit how many jobs run simultaneously, job locking to prevent duplicate execution in clustered environments, and configurable retry logic. The companion package agendash provides a web dashboard for monitoring job status.

Best For

  • Node.js applications already using MongoDB as their database
  • Multi-instance deployments that need distributed job locking
  • Applications requiring persistent job state that survives restarts
  • Projects that benefit from a web dashboard (agendash) for job monitoring

Limitations

  • Requires MongoDB — adds a database dependency if you are not already using it
  • Polling-based design means minimum interval is the poll frequency (default 5 seconds)
  • Performance can degrade with very large numbers of jobs in the collection
  • Less actively maintained than some alternatives like BullMQ

Agenda vs CronJobPro

Agenda provides job persistence and distributed locking that simple in-memory schedulers lack, making it more reliable for production use. However, it still runs within your application infrastructure, requiring you to maintain MongoDB and monitor the Agenda process. CronJobPro eliminates this operational burden by handling scheduling, monitoring, and alerting externally, while your application simply exposes HTTP endpoints.

Official Website

https://github.com/agenda/agenda

Frequently Asked Questions

What is Agenda?

Agenda is a job scheduling library for Node.js that stores job definitions and state in MongoDB. Unlike in-memory schedulers, Agenda persists all job data to the database, meaning scheduled jobs survive process restarts and can be managed across multiple application instances. It supports cron-style scheduling, one-time delayed jobs, and recurring intervals.

What is Agenda best for?

Node.js applications already using MongoDB as their database. Multi-instance deployments that need distributed job locking. Applications requiring persistent job state that survives restarts. Projects that benefit from a web dashboard (agendash) for job monitoring.

How does Agenda compare to an external cron service?

Agenda provides job persistence and distributed locking that simple in-memory schedulers lack, making it more reliable for production use. However, it still runs within your application infrastructure, requiring you to maintain MongoDB and monitor the Agenda process. CronJobPro eliminates this operational burden by handling scheduling, monitoring, and alerting externally, while your application simply exposes HTTP endpoints.

Related Alternatives

Try CronJobPro for Free

Schedule HTTP requests with monitoring, retries, and alerts — no infrastructure needed.

Get started free →