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

Allow 5-field expressions #136

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Arshia001
Copy link

This is my proposed implementation for #13. This allows 5-field expressions to be parsed without any change in the existing behavior. There's certainly more that can be done in this area, but I feel this is a useful step in the right direction.

@zslayton
Copy link
Owner

When I started this, I was following the Quartz scheduler's cron syntax spec, which doesn't recognize 5-field expressions. However, there's no cron standard, only lots of different conventions of varying popularity. Is there one out there that accepts 5-field expressions? If so, I think we can merged this.

@Arshia001
Copy link
Author

Is is my understanding that the cron implementation in linux only supports 5 fields. It is also my understanding that this is the more ubiquitous format; for example, saffron (from cloudflare) only supports 5-field expressions: https://github.com/cloudflare/saffron/blob/bb9bb16e112f9ab69161d55181ffc259708824ae/saffron/src/parse.rs#L632

I do need to fix the CI though, just noticed it's red.

@zslayton
Copy link
Owner

Cool, thanks. Can you add a unit test that iterates through the output of a couple of example 5-field schedules to make sure they work as expected?

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

Successfully merging this pull request may close these issues.

2 participants