Rust flavor of the popular cron scheduler croner.
MIT License
Bot releases are hidden (Show)
This release contains a minor update, exposing the errors
module to the public interface.
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v2.0.3...v2.0.4
Published by Hexagon 10 months ago
Maintenance release focusing mainly on documentation updates and additional test cases.
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v2.0.2...v2.0.3
Published by Hexagon 10 months ago
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v2.0.1...v2.0.2
Published by Hexagon 10 months ago
CronError::TimeSearchLimitExceeded
.Full Changelog: https://github.com/Hexagon/croner-rust/compare/v2.0.0...v2.0.1
Published by Hexagon 10 months ago
Croner 2.0 introduces key changes, notably the default disabling of second granularity and added opt-in support for Quartz-style handling of weekday numbers.
.with_seconds_required
and .with_seconds_optional
: Now you can specify if second-level precision in your cron patterns should be disabled (default), optional or required..with_alternative_weekdays
: This feature allows the configuration of alternative weekday handling (e.g. Quartz compatibility).CronPattern
.Full Changelog: https://github.com/Hexagon/croner-rust/compare/v1.0.5...v2.0.0
Published by Hexagon 10 months ago
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v1.0.4...v1.0.5
Published by Hexagon 11 months ago
.with_dom_and_dow(bool)
: New method which allow you to modify how the day of the month and day of the week values are combined.Full Changelog: https://github.com/Hexagon/croner-rust/compare/v1.0.3...v1.0.4
Published by Hexagon 11 months ago
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v1.0.0...v1.0.3
Published by Hexagon 11 months ago
Published by Hexagon 11 months ago
Initial Stable Release
Introducing crate croner
version 1.0.0 - a fully featured, lightweight and efficient Rust library for parsing and evaluating cron patterns.
Key Features:
@yearly
, @monthly
, @weekly
, @daily
, @hourly
.Usage Example showcasing is_time_matching
, find_next_occurrence
and iter_from
:
use croner::Cron;
use chrono::Local;
// Example: Parse cron expression
let cron: Cron = "0 18 * * * FRI".parse().expect("Couldn't parse cron string");
// Example: Compare cron pattern with current local time
let time = Local::now();
let matches = cron.is_time_matching(&time).unwrap();
// Example: Get next match
let next = cron.find_next_occurrence(&time, false).unwrap();
// Output results
println!("Current time is: {}", time);
println!("Pattern \"{}\" does {} time {}", cron.pattern.to_string(), if matches { "match" } else { "not match" }, time );
println!("Pattern \"{}\" will match next time at {}", cron.pattern.to_string(), next);
// Example: Iterator
println!("Next 5 matches:");
for time in cron.clone().iter_from(Local::now()).take(5) {
println!("{}", time);
}
For detailed usage and API documentation, visit Croner on docs.rs and check out the README.
Published by Hexagon 11 months ago
scheduler.tick()
now returns a SchedulerResult
(::Dead
,::NoOp
,::TaskTriggered
or ::ThreadPoolExhausted
) instead of bool
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v0.0.9...v0.0.10
Published by Hexagon 11 months ago
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v0.0.8...v0.0.9
Published by Hexagon 11 months ago
Full Changelog: https://github.com/Hexagon/croner-rust/compare/0.0.7...v0.0.8
Published by Hexagon 11 months ago
W
featureFull Changelog: https://github.com/Hexagon/croner-rust/compare/v0.0.6...0.0.7
Published by Hexagon 11 months ago
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v0.0.5...v0.0.6
Published by Hexagon 11 months ago
is_time_matching
and find_next_occurrence
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v0.0.4...v0.0.5
Published by Hexagon 12 months ago
iter_from
and iter_after
Full Changelog: https://github.com/Hexagon/croner-rust/compare/v0.0.3...v0.0.4
Published by Hexagon 12 months ago
5#2
and 5#L
).L
.dom_and_dow
defaulting to false
.Full Changelog: https://github.com/Hexagon/croner-rust/compare/v0.0.2...v0.0.3
Published by Hexagon 12 months ago