系统设置增加系统运行日志

This commit is contained in:
whyour
2023-08-21 00:10:43 +08:00
parent b002cbef3a
commit 4f7649f157
33 changed files with 864 additions and 112 deletions
+8 -1
View File
@@ -22,11 +22,18 @@ const addCron = (
cmdStr = `${TASK_PREFIX}${cmdStr}`;
}
Logger.info(
'[schedule][创建定时任务], 任务ID: %s, cron: %s, 执行命令: %s',
id,
schedule,
command,
);
scheduleStacks.set(
id,
nodeSchedule.scheduleJob(id, schedule, async () => {
Logger.info(
`当前时间: ${dayjs().format(
`[schedule] 时间: ${dayjs().format(
'YYYY-MM-DD HH:mm:ss',
)},运行命令: ${cmdStr}`,
);