cronspeak
Say cron out loud. Turn cron expressions into clear, human-readable English —
the way cronstrue (JavaScript) and
cron-descriptor (Python) do.
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Zero dependencies. #![no_std] (needs only alloc). Pure logic — easy to trust.
Why cronspeak?
Rust has excellent crates for running cron schedules
(cron, croner),
but nothing maintained for explaining one to a human. cronspeak fills that
gap — perfect for admin dashboards, scheduling UIs, config validators, and CLIs
that want to show "this job runs: …".
Install
[]
= "0.1"
Usage
use ;
// Default: 12-hour clock.
assert_eq!;
// 24-hour clock.
let opts = new.time_format;
assert_eq!;
More examples
| Expression | Description |
|---|---|
* * * * * |
Every minute |
*/5 * * * * |
Every 5 minutes |
0 * * * * |
At 0 minutes past the hour |
0 0 * * * |
At 12:00 AM |
0 9 * * 1-5 |
At 09:00 AM, Monday through Friday |
0 0,12 * * * |
At 12:00 AM and 12:00 PM |
0 0 1,15 * * |
At 12:00 AM, on days 1 and 15 of the month |
*/15 9-17 * * 1-5 |
Every 15 minutes, between 09:00 AM and 05:59 PM, Monday through Friday |
0 0 1 1 * |
At 12:00 AM, on day 1 of the month, only in January |
@yearly |
At 12:00 AM, on day 1 of the month, only in January |
Supported syntax
Standard 5-field cron (minute hour day-of-month month day-of-week) with:
*(every), single values, lists (a,b,c), ranges (a-b), steps (*/n,a-b/n,a/n)- month names
JAN…DECand weekday namesSUN…SAT(case-insensitive) - both
0and7for Sunday - macros:
@yearly/@annually,@monthly,@weekly,@daily/@midnight,@hourly
Out-of-range values, inverted ranges, zero steps, and wrong field counts return a
typed [CronError]. Non-standard L/W/# qualifiers and 6/7-field (seconds /
year) expressions are not supported in this release.
no_std
cronspeak is #![no_std] and only needs alloc. It builds for bare-metal
targets such as thumbv7em-none-eabi.
Contributors ✨
This project follows the all-contributors specification. Contributions of any kind are welcome — code, docs, bug reports, ideas, reviews! See the emoji key for how each contribution is recognized, and open a PR or issue to get involved.
Thanks goes to these wonderful people:
License
Licensed under either of Apache-2.0 or MIT at your option.