Skip to main content

Welcome to Chronos Documentation

ยท 3 min read
Marco Bertelli
Chronos Maintainer

We're excited to launch the official documentation site for Chronos - a light-weight, powerful job scheduling library for Node.js!

What is Chronos?โ€‹

Chronos is a robust job scheduler originally forked from Agenda TS, designed to handle background job processing in Node.js applications with MongoDB persistence. It's actively maintained and used in production by Runelab for 100+ projects.

Key Featuresโ€‹

  • โšก Minimal Overhead: Lightweight and efficient
  • ๐Ÿ—„๏ธ MongoDB Backed: Reliable job persistence
  • ๐Ÿ”„ Promise-Based API: Modern async/await support
  • โฐ Flexible Scheduling: Cron, intervals, and natural language
  • ๐ŸŽฏ Priority & Concurrency: Fine-grained control
  • ๐Ÿ“Š Event System: Comprehensive monitoring
  • ๐Ÿš€ Production Ready: Battle-tested reliability

Why We Created This Documentationโ€‹

As Chronos has grown and evolved, we realized the need for comprehensive, well-organized documentation. This new site provides:

  • Clear Getting Started Guide: Get up and running in 5 minutes
  • Complete API Reference: Every method and option documented
  • Real-World Examples: Production-ready code samples
  • Best Practices: Lessons learned from 100+ deployments
  • Troubleshooting: Solutions to common issues

What's Newโ€‹

Modern MongoDB Supportโ€‹

Chronos now supports the latest MongoDB versions with updated drivers, ensuring compatibility with modern MongoDB deployments including Atlas.

Enhanced Performanceโ€‹

We've optimized job processing and added better concurrency controls for improved performance in high-throughput scenarios.

Better TypeScript Supportโ€‹

Full TypeScript definitions and examples help you build type-safe job processors.

Getting Startedโ€‹

Ready to dive in? Here are some great starting points:

  1. Installation Guide - Set up Chronos in minutes
  2. Quick Start - Your first job in 5 minutes
  3. Basic Concepts - Understand the fundamentals
  4. Examples - See real-world usage patterns

Example: Your First Jobโ€‹

Here's a taste of how simple Chronos is to use:

const { Chronos } = require('chronos-jobs');

const scheduler = new Chronos({
db: { address: 'mongodb://localhost:27017/scheduler' }
});

// Define what the job does
scheduler.define('send welcome email', async (job) => {
const { userId } = job.attrs.data;
await sendWelcomeEmail(userId);
});

// Start processing jobs
await scheduler.start();

// Schedule a job
await scheduler.now('send welcome email', { userId: '12345' });

Community and Supportโ€‹

Chronos is actively maintained and we welcome contributions:

What's Next?โ€‹

We're continuously improving Chronos and this documentation. Upcoming additions include:

  • More advanced examples and patterns
  • Performance optimization guides
  • Integration tutorials with popular frameworks
  • Video tutorials and walkthroughs

Feedback Welcome!โ€‹

This documentation is a living resource. If you find areas that need improvement, have suggestions for new content, or spot any issues, please let us know through GitHub issues or contribute directly.

Thank you for using Chronos, and we hope this documentation helps you build amazing applications with reliable background job processing!


Happy coding!
The Chronos Team