Using One Cron Parser Everywhere With Rust and Saffron
Dec 25, 2020Aaron Loyd

Summary
This post details the development and integration of 'saffron', a Rust-based cron parser, to solve the problem of inconsistent cron expression parsing across different parts of the Cloudflare Workers stack (UI, API, backend). It highlights the challenges of non-standardized cron extensions, the use of the 'nom' crate for parsing, and the benefits of using a single, shared parser for consistency and improved developer experience. The post also discusses the evolution of the cron parser from multiple disparate libraries to a unified solution, including addressing off-by-one errors in day-of-week interpretation.