Show HN: Cronexpr, a Rust library to parse and iter crontab expression
1–10 of 36 posts
Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#2Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#3Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#4Looks well done. I like how the docs describe every syntax feature, and every non-standard feature in detail. Hat tip to implementing Vixie's "*,10" quirk, and to handling DST.
And when I sorted out the parse structure [1] and finished the extensions [2][3], I believe I should write it down for others (and future me) :D
[1] https://github.com/tisonkun/cronexpr/pull/4
Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#5Main drawback is the need for timestamps. Most crontab files or expressions I've seen didn't have them.
Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#6Main drawback is the need for timestamps. Most crontab files or expressions I've seen didn't have them.
In cronexpr, there is no requirement for a timestamp until you'd like to find the next scheduled time, and thus you need to provide a related point.
To decouple with certain datetime lib, I made a `MakeTimestamp` struct which provides multiple constructors. Later, I found it somehow like a function overload :D
Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#7Main drawback is the need for timestamps. Most crontab files or expressions I've seen didn't have them.
Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#8Main drawback is the need for timestamps. Most crontab files or expressions I've seen didn't have them.
[1] https://docs.rs/cronexpr/latest/cronexpr/#why-does-the-crate...
Re: Show HN: Cronexpr, a Rust library to parse and iter crontab expression
#9Main drawback is the need for timestamps. Most crontab files or expressions I've seen didn't have them.
If you mean timezone, I wrote an FAQ [1]: "Why does the crate require the timezone to be specified in the crontab expression?" [1] https://docs.rs/cronexpr/latest/cronexpr/#why-does-the-crate...
Assuming UTC for tz is not weird and cron users expect it,
I guess why even support this specific syntax if the crons need to be edited to fit how this code expects them? There may have been better options if you were going full green field.
Good work though!