Welcome to Chronos
Chronos is a light-weight job scheduling library for Node.js that provides robust, MongoDB-backed job persistence with a modern Promise-based API.
Getting started
Let's discover Chronos in less than 5 minutes.
What is Chronos?
Chronos is a lightweight job scheduling library for Node.js, originally forked from Agenda but with a crucial difference: it's actively maintained and production-ready.
Built on MongoDB, Chronos provides reliable job scheduling with modern Promise-based APIs, making it perfect for production applications that need dependable background task processing.
Why Choose Chronos?
Feature Comparison
Since there are a few job queue solutions, here's a table comparing them to help you choose the best one for your needs:
Feature | Bull | Bee | Chronos |
---|---|---|---|
Backend | Redis | Redis | MongoDB |
Priorities | ✅ | ❌ | ✅ |
Concurrency | ✅ | ✅ | ✅ |
Delayed jobs | ✅ | ❌ | ✅ |
Global events | ✅ | ❌ | ✅ |
Rate Limiter | ✅ | ❌ | ❌ |
Pause/Resume | ✅ | ❌ | ✅ |
Sandboxed worker | ✅ | ❌ | ✅ |
Repeatable jobs | ✅ | ❌ | ✅ |
Atomic ops | ✅ | ✅ | ~ |
Persistence | ✅ | ✅ | ✅ |
UI | ✅ | ❌ | ✅ |
REST API | ❌ | ❌ | ✅ |
Central (Scalable) Queue | ❌ | ❌ | ✅ |
Supports long running jobs | ❌ | ❌ | ✅ |
Optimized for | Jobs / Messages | Messages | Jobs |
Active Maintenance | ⚠️ | ⚠️ | ✅ |
Kudos for making the comparison chart goes to Bull maintainers.
The MongoDB Advantage: If you're already using MongoDB, why add Redis complexity? Chronos gives you enterprise-grade job scheduling using your existing database infrastructure.
Key Features
- MongoDB Backed: Reliable persistence layer using MongoDB
- Promise Based: Modern async/await API with full TypeScript support
- Flexible Scheduling: Cron syntax, human-readable intervals, or exact dates
- Production Ready: Used in 100+ production projects by Runelab
- Active Maintenance: Regular updates and community support
- Event System: Hook into job lifecycle with events
- Priority & Concurrency: Configure job priorities and concurrent execution
Why Choose Chronos?
🔄 Improved from Agenda
- Updated MongoDB drivers for latest MongoDB versions
- Enhanced performance optimizations
- Active maintenance and ongoing development
- Modern TypeScript support
🚀 Production Proven
- Used in 100+ production projects
- Reliable job persistence and recovery
- Scalable across multiple instances
- Comprehensive error handling
🛠 Developer Friendly
- Clean, intuitive API
- Extensive documentation
- Rich event system for monitoring
- Easy integration with existing applications
Quick Example
const mongoConnectionString = 'mongodb://127.0.0.1/scheduler';
const scheduler = new Chronos({ db: { address: mongoConnectionString } });
// Define a job
scheduler.define('send welcome email', async job => {
const { userId } = job.attrs.data;
await sendWelcomeEmail(userId);
});
// Start the scheduler
await scheduler.start();
// Schedule a job
await scheduler.now('send welcome email', { userId: '12345' });
What's Next?
- 📖 Installation Guide - Get Chronos up and running
- 🚀 Quick Start - Your first Chronos job in 5 minutes
- 📚 API Reference - Complete API documentation
- 💡 Examples - Real-world usage examples
Community & Support
Ready to get started? Check out our installation guide or jump straight into the quick start tutorial!