grahamar/cron-parser

nextExecution for invalid date causes infinite loop

catharsis opened this issue · 1 comments

Reproduced by:

  @Test
  public void infiniteLoop() {
    Cron cron = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.UNIX))
      .parse("0 0 30 2 *");
    ExecutionTime.forCron(cron).nextExecution(ZonedDateTime.now());
  }

Sorry, wrong cron library 😊