mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
从配置文件加载任务时,自定义ID避免重复从配置文件加载
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user