question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DateTimeException thrown from ExecutionTime.nextExecution

See original GitHub issue

Cron 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:closed
  • Created 7 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jmrozaneccommented, Nov 17, 2016
0reactions
jmrozaneccommented, Nov 30, 2016

@francisdb Great! Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found