From 35ffe7e6353f5bbbbceb6f61457bc18c27adba0b Mon Sep 17 00:00:00 2001 From: YannC Date: Wed, 8 Jan 2025 13:54:14 +0100 Subject: [PATCH] fix(webserver): reset correctly nextExecutionDate when enabling schedule close #6681 --- .../io/kestra/webserver/controllers/api/TriggerController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/webserver/src/main/java/io/kestra/webserver/controllers/api/TriggerController.java b/webserver/src/main/java/io/kestra/webserver/controllers/api/TriggerController.java index 022ba4e74a0..526a5dd658e 100644 --- a/webserver/src/main/java/io/kestra/webserver/controllers/api/TriggerController.java +++ b/webserver/src/main/java/io/kestra/webserver/controllers/api/TriggerController.java @@ -261,6 +261,7 @@ public HttpResponse update( // If we are enabling back a schedule trigger, // then we need to handle its recoverMissedSchedules if (current.getDisabled() && !newTrigger.getDisabled() && abstractTrigger instanceof Schedule schedule) { + nextExecutionDate = schedule.nextEvaluationDate(); RecoverMissedSchedules recoverMissedSchedules = schedule.getRecoverMissedSchedules(); if (recoverMissedSchedules == RecoverMissedSchedules.LAST) { nextExecutionDate = schedule.previousEvaluationDate(conditionContext);