更新手动执行cron参数

This commit is contained in:
whyour committed 2021-04-03 22:19:02 +08:00
1 parent 7eba87aa2c
commit df1dc4fcbb
3 files changed
+7 -9

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@ export default class CronService {
let logFile = `${config.manualLogPath}${res._id}.log`;
fs.writeFileSync(logFile, `${new Date().toString()}\n\n`);
const cmd = spawn(res.command, { shell: true });
const cmd = spawn(`${res.command} now`, { shell: true });
this.cronDb.update({ _id }, { $set: { status: CrontabStatus.running } });