From 70c4d59fdcd3d3501827f6d682125ec1c0136fa4 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Thu, 15 Jun 2023 23:30:08 +0200 Subject: [PATCH] Fix CronScheduler skipping 1 scheduled time after application restart --- .../src/main/java/fr/pandacube/lib/core/cron/CronScheduler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandalib-core/src/main/java/fr/pandacube/lib/core/cron/CronScheduler.java b/pandalib-core/src/main/java/fr/pandacube/lib/core/cron/CronScheduler.java index d2e944a..32d1ead 100644 --- a/pandalib-core/src/main/java/fr/pandacube/lib/core/cron/CronScheduler.java +++ b/pandalib-core/src/main/java/fr/pandacube/lib/core/cron/CronScheduler.java @@ -57,7 +57,7 @@ public class CronScheduler { CronTask next = tasks.get(0); if (next.nextRun <= now) { next.runAsync(); - setLastRun(next.taskId, next.nextRun); + setLastRun(next.taskId, now); onTaskUpdate(false); continue; }