从配置文件加载任务时,自定义ID避免重复从配置文件加载

This commit is contained in:
Looly
2022-06-27 20:06:12 +08:00
parent 8032f828fe
commit cbb3592a70
2 changed files with 4 additions and 2 deletions

View File

@@ -211,7 +211,8 @@ public class Scheduler implements Serializable {
final String pattern = entry.getValue();
StaticLog.debug("Load job: {} {}", pattern, jobClass);
try {
schedule(pattern, new InvokeTask(jobClass));
// issue#I5E7BM@Gitee自定义ID避免重复从配置文件加载
schedule("id_" + jobClass, pattern, new InvokeTask(jobClass));
} catch (Exception e) {
throw new CronException(e, "Schedule [{}] [{}] error!", pattern, jobClass);
}