Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudflare/saffron
The cron parser powering Cron Triggers on Cloudflare Workers
https://github.com/cloudflare/saffron
cloudflare-workers cron rust
Last synced: about 1 month ago
JSON representation
The cron parser powering Cron Triggers on Cloudflare Workers
- Host: GitHub
- URL: https://github.com/cloudflare/saffron
- Owner: cloudflare
- License: bsd-3-clause
- Created: 2020-09-30T17:09:51.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-26T15:13:49.000Z (about 2 months ago)
- Last Synced: 2024-10-03T21:41:18.709Z (about 1 month ago)
- Topics: cloudflare-workers, cron, rust
- Language: Rust
- Homepage:
- Size: 163 KB
- Stars: 234
- Watchers: 27
- Forks: 16
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-list - saffron
README
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