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

Day of week number can't be bigger than 5 #263

Closed
dalex-am opened this issue Nov 14, 2022 · 4 comments
Closed

Day of week number can't be bigger than 5 #263

dalex-am opened this issue Nov 14, 2022 · 4 comments
Assignees

Comments

@dalex-am
Copy link

if (!occurrence || isNaN(occurrenceNum)) {

Can you add one more condition into "if"?

@Airfooox
Copy link
Owner

Airfooox commented Nov 17, 2022

I don't quite know what you mean. The dayof the week can't be greater than 5? Why not?

Do you mean it shouldn't get greater than 5 and cron-validate doesnt check for it or doesn't it currently allow it to be bigger than 5?

If we look here for example: http://crontab.org/ or https://docs.aws.amazon.com/de_de/AmazonCloudWatch/latest/events/ScheduledEvents.html the day of the week can go from 0 to 7 / 1 to 7.

@Airfooox Airfooox self-assigned this Nov 17, 2022
@dalex-am
Copy link
Author

dalex-am commented Nov 17, 2022

I mean value "1#8" equals to 8th sunday/monday of month. Max count of any DOW cannot be greater than 5 just because of calendar structure. Write here "* * * ? * 3#8 *"

@Airfooox
Copy link
Owner

Alright, thanks. I'm gonna check that as soon as I got time to do so (like Sunday/Monday)

Airfooox pushed a commit that referenced this issue Nov 20, 2022
## [1.4.5](v1.4.4...v1.4.5) (2022-11-20)

### Bug Fixes

* day of week occurence number cannot be bigger than 5 ([#263](#263)) ([62cbb9b](62cbb9b))
@Airfooox
Copy link
Owner

Fixed this in version 1.4.5, thanks bringing up the issue!

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

2 participants