修改任务执行日志目录规则

This commit is contained in:
whyour
2022-09-11 19:43:37 +08:00
parent 7354a61184
commit 281ed6cfba
3 changed files with 24 additions and 67 deletions
+1 -1
View File
@@ -412,7 +412,7 @@ export default class CronService {
cmdStr = `${cmdStr} now`;
}
const cp = spawn(cmdStr, { shell: '/bin/bash' });
const cp = spawn(`ID=${id} ${cmdStr}`, { shell: '/bin/bash' });
await CrontabModel.update(
{ status: CrontabStatus.running, pid: cp.pid },