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
A cron-utils bug by withValidRange #428
Comments
here is the unit test. plz check it.
|
version is 9.0.2. |
@HongZhaoHua thanks! If it is not too much to ask, may you send us a PR with the proposed test? Thanks! |
@jmrozanec |
@HongZhaoHua sure we see it 😄 But on GitHub we usually contribute code as PR and not through comments. If you have some minutes and could be so kind as to post a PR, we will be glad to merge it. Thanks! |
I'm wondering if this is really a bug. It is true that QUARTZ cron expression only takes year between 1970 and 2099, but do we have that limit for the execution time? |
@IndeedSi we shall support the definition, including the constraints. |
@jmrozanec Gotcha. I have got a change for passing the constraint from cron definition to execution time. |
…ution-time #428 Pass valid range constraints from cron definition to execution time
define CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ)
use cron "0 0 12 * * ?"
and use dateTime = ZonedDateTime.of(1900, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC);
now, run execution.nextExecution(dateTime);
you will get the result is 1900-1-1T12:00
but in fact, the result must be 1970-1-1T12:00 because CronType.QUARTZ was limit the year range from 1970 to 2099.
The text was updated successfully, but these errors were encountered: