An Elixir library for parsing, composing, and calculating execution dates from Cron expressions.
Crontab is an Elixir library for parsing, composing, and calculating execution dates from Cron expressions. It provides tools to work with standard and extended Cron formats, enabling developers to integrate scheduling logic into their Elixir applications. The library solves the problem of programmatically handling Cron-based task scheduling without relying on external system tools.
Elixir developers building applications that require task scheduling, job runners, or cron-like functionality within their codebase.
Developers choose Crontab for its idiomatic Elixir API, comprehensive feature set covering parsing, composition, and date calculation, and its reliability as a dedicated library for Cron operations in the Elixir ecosystem.
:alarm_clock: Parse Cron Expressions, Compose Cron Expression Strings and Caluclate Execution Dates.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses sigils like ~e[cron expression] for static definitions, making code concise and Elixir-native, as shown in the README examples for easy integration.
Handles both standard and extended Cron expressions with seconds, allowing for finer scheduling precision beyond typical minute-level granularity.
Can parse dynamic Cron strings into structs and compose strings from structs, enabling programmatic manipulation and validation of scheduling rules.
Provides functions like get_next_run_date and get_next_run_dates to calculate execution dates with precision, supporting single or multiple future dates.
The library only handles Cron expression logic; developers must implement task scheduling and execution separately, adding overhead for complete solutions.
Cannot handle scheduling rules outside standard Cron, such as last day of month or business days, unless explicitly encoded in Cron expressions.
While sigils simplify static expressions, dynamic parsing requires using the Parser module with flags, which can be more verbose and error-prone.