DateTimeException thrown from ExecutionTime.nextExecution
See original GitHub issueCron expression: 0 0 10 ? * SAT-SUN
java.time.DateTimeException: Invalid value for DayOfMonth (valid values 1 - 28/31): -1
at java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)
at java.time.temporal.ChronoField.checkValidValue(ChronoField.java:703)
at java.time.LocalDate.of(LocalDate.java:268)
at com.cronutils.model.time.generator.BetweenDayOfWeekValueGenerator.isMatch(BetweenDayOfWeekValueGenerator.java:128)
at com.cronutils.model.time.generator.FieldValueGenerator.generateCandidates(FieldValueGenerator.java:69)
at com.cronutils.model.time.ExecutionTime.generateDayCandidatesQuestionMarkSupported(ExecutionTime.java:422)
at com.cronutils.model.time.ExecutionTime.generateDays(ExecutionTime.java:324)
at com.cronutils.model.time.ExecutionTime.nextClosestMatch(ExecutionTime.java:172)
at com.cronutils.model.time.ExecutionTime.nextExecution(ExecutionTime.java:126)
We should start indicating in the javadocs what kinds of errors a method can throw
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
com.cronutils.model.time.ExecutionTime#nextExecution
This page shows Java code examples of com.cronutils.model.time.ExecutionTime#nextExecution.
Read more >com.cronutils.model.time.ExecutionTime.nextExecution java ...
//Get date for next execution DateTime now = DateTime.now(); CronDefinition cronDefinition = CronDefinitionBuilder.instanceDefinitionFor(QUARTZ); CronParser ...
Read more >ExecutionTime (cron-utils 9.0.1 API) - javadoc.io
Returns: Optional ZonedDateTime instance, never null. Contains next execution time or empty. timeToNextExecution. Optional<java.time.
Read more >java - Scala code using static method in interface gives error ...
nextExecution (currDateTime).get().toInstant(); Instant prev = ExecutionTime.forCron(cron).lastExecution(currDateTime).get().
Read more >Cron utils for parsing, validations and human readable ...
Obtain last/next execution time as well as time from last execution/time to next ... #110: DateTimeException thrown from ExecutionTime.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@francisdb @espiegel Fixed!
@francisdb Great! Thanks!