Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0 Metaissue #67

Open
4 of 7 tasks
zslayton opened this issue Feb 1, 2021 · 5 comments
Open
4 of 7 tasks

v1.0 Metaissue #67

zslayton opened this issue Feb 1, 2021 · 5 comments

Comments

@zslayton
Copy link
Owner

zslayton commented Feb 1, 2021

Items in this list need to be completed before 1.0 is cut, but they will be released incrementally in minor version bumps.

TODO:

  • PartialEq and Eq implementations for Schedule (See PartialEq and Eq for the Schedule type #61)

  • Allow users to test whether a given DateTime matches their schedule (See Add a method to test whether a DateTime matches a Schedule #16)

  • Allow users to iterate over a Schedule backwards, viewing matching historical DateTimes (See impl DoubleEndedIterator for ScheduleIterator #66)

  • Provide a convenience method for iterating over a window of time (schedule.from(time1).to(time2))

  • ScheduleParserBuilder that allows users to specify different configuration options. Options included TBD, but ideas include:

    • 0- vs 1-based indexing for some fields
    • Recognizing a different set of strings for days of the week or months of the year
    • Specifying whether an extra field represents seconds or years (See Make 'seconds' field optional #13)

    No individual option is required for 1.0, but introducing a ScheduleParserBuilder is. Individual options can be added without it being a breaking change.

  • Proper documentation

  • Re-license to dual MIT/Apache2

@Stupremee
Copy link

I suggest to add a high level parse method so you can parse a cron expression using something like this:

let job = cron::parse(some_cron_expr).unwrap();

// ...

This feels much more natural and is easier to read.

@willbuckner
Copy link

Would it be possible to do even a beta or RC release sometime soon? :) The nom update is needed to fix an incompatibility with argonautica v2:

Running cargo outdated gives me this, and I know some others around the internet are reporting the same.

Happy to help test an RC and provide feedback!

error: failed to select a version for `nom`.
    ... required by package `argonautica v0.2.0`
    ... which satisfies dependency `argonautica = "^0.2.0"` of package `<my crate> v0.1.0 (/var/folders/4n/dw119dzd09xg6g65gc2zv1qc0000gp/T/cargo-outdatedFGZAad)`
versions that meet the requirements `^4.2` are: 4.2.3, 4.2.2, 4.2.1, 4.2.0

all possible versions conflict with previously selected packages.

  previously selected package `nom v4.1.0`
    ... which satisfies dependency `nom = "~4.1"` of package `cron v0.9.0`
    ... which satisfies dependency `cron = "^0.9.0"` of package `<my crate> v0.1.0 (/var/folders/4n/dw119dzd09xg6g65gc2zv1qc0000gp/T/cargo-outdatedFGZAad)`

failed to select a version for `nom` which could resolve this conflict

@zslayton
Copy link
Owner Author

Hi @willbuckner, no need to wait on the full v1.0, I'll try to get a v0.10 with the latest commits published soon.

@willbuckner
Copy link

willbuckner commented Mar 21, 2022 via email

@matthiasbeyer
Copy link

I suggest to add a high level parse method so you can parse a cron expression using something like this: [...]

It might be also worth adding a serde implementation for cron::Schedule, so users can use the type in configuration files...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants