We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
public static void main(String[] args) { CronDefinition definition = CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ); CronParser parser = new CronParser(definition); Cron cron = parser.parse("*/8 * * * * ?"); ExecutionTime executionTime = ExecutionTime.forCron(cron); ZonedDateTime now = ZonedDateTime.of(2024, 9, 12, 10, 46, 57, 0, ZoneOffset.UTC); System.out.println("now "+now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); now = executionTime.nextExecution(now).get(); System.out.println(" nextExecution "+ now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); }
Run the code. result is: now 2024-09-12 10:46:57 nextExecution 2024-09-12 10:47:00
During cross-minute, the next execution time is incorrect.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
public static void main(String[] args) {
CronDefinition definition = CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ);
CronParser parser = new CronParser(definition);
Cron cron = parser.parse("*/8 * * * * ?");
ExecutionTime executionTime = ExecutionTime.forCron(cron);
ZonedDateTime now = ZonedDateTime.of(2024, 9, 12, 10, 46, 57, 0, ZoneOffset.UTC);
System.out.println("now "+now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
now = executionTime.nextExecution(now).get();
System.out.println(" nextExecution "+ now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
}
Run the code. result is:
now 2024-09-12 10:46:57
nextExecution 2024-09-12 10:47:00
During cross-minute, the next execution time is incorrect.
The text was updated successfully, but these errors were encountered: