From 746688eefab4457ce77062093010871558239851 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Mon, 28 Oct 2024 18:52:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=20=E5=90=8E=E5=8F=B0=E4=BB=BB=E5=8A=A1=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1048138 --user=王旭 【系统设置】系统-系统后台任务-下次执行时间-排序后顺序错误 https://www.tapd.cn/55049933/s/1599597 --- .../metersphere/system/service/BaseTaskHubService.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java index e1502be46e..3dd401bbaa 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/BaseTaskHubService.java @@ -279,13 +279,8 @@ public class BaseTaskHubService { item.setNextTime(trigerTimeMap.get(item.getResourceId()).getNextTime()); item.setLastTime(trigerTimeMap.get(item.getResourceId()).getLastTime()); } else { - try { - CronExpression cron = new CronExpression(item.getValue()); - Date date = new Date(System.currentTimeMillis()); - item.setNextTime(cron.getNextValidTimeAfter(date).getTime()); - } catch (ParseException e) { - LogUtils.error(e); - } + item.setNextTime(item.getNextTime()); + item.setLastTime(item.getLastTime()); } } }