更新手动执行cron参数

This commit is contained in:
whyour
2021-04-03 22:19:02 +08:00
parent 7eba87aa2c
commit df1dc4fcbb
3 changed files with 7 additions and 9 deletions
+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 } });