Rust · single binary · cron

A cron scheduler in Rust
you can actually unit test.

Metronome is a single-binary cron-style job scheduler. No daemon, no global state, no root-owned crontab. The schedule logic is a pure library function, fully unit tested, that you can embed in your own project.

View on GitHub Try the demo

next fire times, computed live in your browser

Why it is different

A schedule engine you can trust because you can test it directly.

Pure schedule engine

next_after(expr, now) is a plain function with no I/O and no shared state. Test it directly, no clock mocking required.

One static binary

No daemon to install, no system-wide crontab to edit as root. Point it at a text file and run.

Embeddable library

Pull in the metronome crate and call the parser and next_after from your own Rust code and your own tests.

Cron syntax supported

FieldRange
minute0-59
hour0-23
day-of-month1-31
month1-12
day-of-week0-7 (0 and 7 both mean Sunday)

Supports *, ranges (1-5), steps (*/15, 1-30/2), and lists (1,3,5). When both day-of-month and day-of-week are restricted, a day matches if it satisfies either field, standard cron semantics.

Usage

metronome next "*/15 * * * *" --count 5
metronome check --file jobs.metro
metronome run --file jobs.metro