修复cron日志获取逻辑

This commit is contained in:
whyour
2021-04-11 10:31:30 +08:00
parent 7105952670
commit 2a7d298f05
2 changed files with 4 additions and 16 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ export default class CronService {
fs.writeFileSync(logFile, `开始执行...\n\n${new Date().toString()}\n`);
let cmdStr = res.command;
if (res.command.startsWith('js')) {
if (res.command.startsWith('js') && !res.command.endsWith('now')) {
cmdStr = `${res.command} now`;
} else if (/&& (.*) >>/.test(res.command)) {
cmdStr = res.command.match(/&& (.*) >>/)[1];