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

[WIP] Make seconds optional #31

Closed
wants to merge 1 commit into from
Closed

[WIP] Make seconds optional #31

wants to merge 1 commit into from

Conversation

Dineshs91
Copy link

Any ideas on how to achieve this ?

Issue #13
Importantly, expressions that do not include seconds but which do include years would be illegal.

For this to work, I guess we have to parse the last part of the cron expression and check if it is an year and err out if seconds is not included.

I am wondering why this expression works 0/30 * * * * and this doesn't */30 * * * *.

@zslayton
Copy link
Owner

Importantly, expressions that do not include seconds but which do include years would be illegal.

Such an expression would be illegal as input but the parser would not be expected to detect that case with certainty.

If the expression had 6 fields, the expectation would be that the sixth field was the rightmost and represented years, not the leftmost and representing seconds. There will be some cases where the parser would successfully read the expression but be unaware that the user mistakenly wanted the sixth field to represent seconds (for example, * * * * * *).

@zslayton
Copy link
Owner

zslayton commented Feb 5, 2021

Closing this out as part of a cleanup. Feel free to re-open it if you pick it back up.

@zslayton zslayton closed this Feb 5, 2021
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