From cbacc756e1060917a8786b68f7c2fe6d5b1a8477 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 21 Mar 2022 13:20:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=85=B3=E9=97=AD=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1011355 --user=郭雨琦 【测试跟踪】-测试计划-任务配置-定时任务开启后,再关闭,定时任务一直仍处于开启状态 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001011355 --- .../src/main/java/io/metersphere/service/ScheduleService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/io/metersphere/service/ScheduleService.java b/backend/src/main/java/io/metersphere/service/ScheduleService.java index 4e0e42819a..9d76ab00e4 100644 --- a/backend/src/main/java/io/metersphere/service/ScheduleService.java +++ b/backend/src/main/java/io/metersphere/service/ScheduleService.java @@ -180,6 +180,9 @@ public class ScheduleService { LogUtil.error(e); MSException.throwException("重置定时任务-删除旧定时任务时出现异常"); } + if(!request.getEnable()){ + return; + } try { scheduleManager.addCronJob(jobKey, triggerKey, clazz, request.getValue(), scheduleManager.getDefaultJobDataMap(request, request.getValue(), SessionUtils.getUser().getId()));