From 5fced1497ba2d36c18847edce84f84ed972107ee Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Mon, 13 May 2019 14:09:26 +0800 Subject: [PATCH 1/2] If there is a scheduled time, take the scheduling time. Recovery from failed nodes, suspension of recovery, re-run for scheduling --- .../common/utils/placeholder/BusinessTimeUtils.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java b/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java index 5dc996bcc5..4af0ccf582 100644 --- a/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java +++ b/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java @@ -50,9 +50,16 @@ public class BusinessTimeUtils { case RECOVER_TOLERANCE_FAULT_PROCESS: case RECOVER_SUSPENDED_PROCESS: case START_FAILURE_TASK_PROCESS: + case REPEAT_RUNNING: case SCHEDULER: default: businessDate = addDays(new Date(), -1); + if (businessDate != null){ + /** + * If there is a scheduled time, take the scheduling time. Recovery from failed nodes, suspension of recovery, re-run for scheduling + */ + businessDate = runTime; + } break; } Date businessCurrentDate = addDays(businessDate, 1); From 34800ada6ce687c922398f44264da73309df7df6 Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Mon, 13 May 2019 14:54:40 +0800 Subject: [PATCH 2/2] Scheduled scheduling, use scheduler-time --- .../common/utils/placeholder/BusinessTimeUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java b/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java index 4af0ccf582..c6c35d3d70 100644 --- a/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java +++ b/escheduler-common/src/main/java/cn/escheduler/common/utils/placeholder/BusinessTimeUtils.java @@ -54,11 +54,11 @@ public class BusinessTimeUtils { case SCHEDULER: default: businessDate = addDays(new Date(), -1); - if (businessDate != null){ + if (runTime != null){ /** * If there is a scheduled time, take the scheduling time. Recovery from failed nodes, suspension of recovery, re-run for scheduling */ - businessDate = runTime; + businessDate = addDays(runTime, -1); } break; }