修复初始化定时服务运行非禁用任务

This commit is contained in:
whyour
2023-04-17 13:36:37 +08:00
parent 4a0c66bcc0
commit f267720af4
2 changed files with 8 additions and 2 deletions
+3
View File
@@ -10,6 +10,9 @@ const addCron = (
) => {
for (const item of call.request.crons) {
const { id, schedule, command } = item;
if (scheduleStacks.has(id)) {
scheduleStacks.get(id)?.cancel();
}
scheduleStacks.set(
id,
nodeSchedule.scheduleJob(id, schedule, async () => {