A zero-dependency cron library for JavaScript and TypeScript that triggers functions and evaluates cron expressions across Node, Deno, Bun, and browsers.
Croner is a lightweight, zero-dependency cron library for JavaScript and TypeScript that schedules tasks using cron expressions. It solves the problem of unreliable or bloated cron implementations by providing a robust, cross-platform solution with extended syntax and built-in safety features like overrun protection and error handling.
JavaScript and TypeScript developers who need reliable task scheduling in Node.js, Deno, Bun, or browser environments, especially those concerned with bundle size and dependency management.
Developers choose Croner for its zero dependencies, cross-platform compatibility, extended cron features (like seconds/year fields and advanced modifiers), and built-in safety mechanisms—offering a more reliable and lightweight alternative to other cron libraries.
Trigger functions or evaluate cron expressions in JavaScript or TypeScript. No dependencies. Most features. Node. Deno. Bun. Browser.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
With no external libraries, Croner minimizes bundle size to 6.8 KB minzip, as shown in the comparison table, reducing bloat and compatibility issues.
Works seamlessly in Node.js, Deno, Bun, and browsers via ESM, UMD, and standalone formats, ensuring broad runtime support without extra configuration.
Supports advanced features like seconds, year fields, last day (L), weekday (W), nth occurrence (#), and AND logic (+), providing fine-grained scheduling control beyond standard cron.
Includes overrun protection to prevent overlapping executions and error handling for unhandled exceptions, enhancing reliability in production environments.
Operates entirely in-memory with no built-in persistence, making it unsuitable for distributed systems or scenarios requiring job recovery after crashes.
Lacks features like job prioritization, complex retry policies, or integration with external job queues, focusing only on basic scheduling controls.
The README highlights a migration section for upgrades, indicating that major version updates may introduce breaking changes, requiring careful updates.