From bb25af7205d5f336fd9e48ca72353932ad45abe2 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 18 八月 2025 10:58:11 +0800
Subject: [PATCH] 完善代码
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/schedulerTask/SchedulerTaskSupport.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/schedulerTask/SchedulerTaskSupport.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/schedulerTask/SchedulerTaskSupport.java
index 0fc205e..7b135ad 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/schedulerTask/SchedulerTaskSupport.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/schedulerTask/SchedulerTaskSupport.java
@@ -19,6 +19,17 @@
SchedulerTaskSupport.threadPoolPriority = threadPoolPriority;
}
}
+
+ /**
+ * 鍒犻櫎宸ヤ綔浠诲姟
+ * @param jobName
+ * @param jobGroupName
+ * @throws SchedulerException
+ */
+ public static void deleteJob(String jobName, String jobGroupName) throws SchedulerException{
+ Scheduler sched = SchedulerTaskFactory.getSingleScheduler() ;
+ sched.deleteJob(new JobKey(jobName, jobGroupName));
+ }
/**
* 娣诲姞姣廥绉掗挓閲嶅宸ヤ綔涓�娆$殑宸ヤ綔浠诲姟锛�
@@ -61,7 +72,6 @@
.withIntervalInSeconds(intervalInSeconds)
.withRepeatCount(repeatCount))
.build();
-
sched.scheduleJob(job, trigger);
sched.start();
--
Gitblit v1.8.0