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

CronBuilder accepting -1 as argument for UNIX #459

Closed
barunhalderkolkata opened this issue Nov 2, 2020 · 2 comments
Closed

CronBuilder accepting -1 as argument for UNIX #459

barunhalderkolkata opened this issue Nov 2, 2020 · 2 comments
Milestone

Comments

@barunhalderkolkata
Copy link

Cron cron = CronBuilder.cron(CronDefinitionBuilder.instanceDefinitionFor(UNIX))
                    .withDoM(always())
                    .withMonth(always())
                    .withDoW(always())
                    .withHour(on(-1))
                    .withMinute(on(5))
                    .instance();

This is creating cron object instead of throwing error like java.lang.IllegalArgumentException: Value -1 not in range [0, 23]

And this is failing eventually while trying to parse.

@jmrozanec
Copy link
Owner

@barunhalderkolkata thank you for reporting this! May we ask a PR with a test? Thanks!

@jmrozanec
Copy link
Owner

@barunhalderkolkata Fixed!

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

No branches or pull requests

2 participants