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

QUARTZ: Incorrect next execution time #363

Closed
Blemicek opened this issue Feb 3, 2019 · 1 comment
Closed

QUARTZ: Incorrect next execution time #363

Blemicek opened this issue Feb 3, 2019 · 1 comment
Milestone

Comments

@Blemicek
Copy link

Blemicek commented Feb 3, 2019

The next execution for QUARTZ cron expression * 1 * * * ? at 2019-01-01T00:01Z should be 2019-01-01T01:01Z not 2019-01-01T00:01:01Z.

Blemicek added a commit to Blemicek/cron-utils that referenced this issue Feb 3, 2019
jmrozanec added a commit that referenced this issue Feb 12, 2019
pangyikhei added a commit to pangyikhei/cron-utils that referenced this issue Oct 5, 2019
pangyikhei added a commit to pangyikhei/cron-utils that referenced this issue Oct 5, 2019
@pangyikhei
Copy link
Contributor

I believe that 2019-01-01T00:01:01Z is the correct next execution time for that cron expression.
You specified * as the value for the seconds, so it should match every second of minute 1 of every hour of every day of every month of every year.

http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/tutorial-lesson-06.html
Wild-cards (the ‘*’ character) can be used to say “every” possible value of this field.

You should use 0 1 * * * ? if you intend to only get the minute 1 of every hour of every day of every month of every year.

I submitted PR #397 with tests for the two expressions 0 1 * * * ? and * 1 * * * ?

jmrozanec added a commit that referenced this issue Oct 7, 2019
Fixed test for #363. Added test for intended expression.
@jmrozanec jmrozanec added this to the next milestone Oct 11, 2020
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

3 participants