Need help with saffron?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

cloudflare
159 Stars 2 Forks BSD 3-Clause "New" or "Revised" License 17 Commits 2 Opened issues

Description

The cron parser powering Cron Triggers on Cloudflare Workers

Services available

!
?

Need anything else?

Contributors list

# 2,335
C#
Discord
Objecti...
protoco...
16 commits

saffron is a cron parser used as part of the backend for Cron Triggers in Cloudflare Workers. It provides APIs for the complete stack, allowing us to use the same parser everywhere. It's made in two parts:

  1. The parser, which is responsible for reading cron expressions into an easy to understand format, which can be simplified with the compiler, or described with

    CronExpr::describe
    .
  2. The compiler, which simplifies expressions into their most compact form. This compact form can check if a chrono date time is contained in a given expression in constant time, no matter the size of the original expression. It can also be used to get future times that match efficiently as an iterator.

The project itself is divided into 4 Rust workspace members:

  1. saffron - the parser itself
  2. saffron-c - the C API used internally by the Workers API
  3. saffron-web - the web API used on the dash in the browser
  4. saffron-worker - the Rust Worker which provides the validate/describe endpoint in the dash API on the edge as a fallback if WASM can't be used in the browser

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.