更新定时任务重启schedule

This commit is contained in:
whyour 2021-05-03 21:54:09 +08:00
parent c28ca15cdd
commit 1f565b31da
2 changed files with 2 additions and 2 deletions

View File

@ -208,6 +208,7 @@ export default class CronService {
fs.writeFileSync(config.crontabFile, crontab_string); fs.writeFileSync(config.crontabFile, crontab_string);
execSync(`crontab ${config.crontabFile}`); execSync(`crontab ${config.crontabFile}`);
execSync(`pm2 restart schedule`);
this.cronDb.update({}, { $set: { saved: true } }, { multi: true }); this.cronDb.update({}, { $set: { saved: true } }, { multi: true });
} }

View File

@ -98,8 +98,7 @@ AutoAddCron="true"
## 在crontab.list中除掉每小时上述时间启动的任务外其他任务在你定义了 RandomDelay 的情况下,一律启用随机延迟,但如果你给某些任务添加了 "now" 或者 "conc",那么这些任务也将无视随机延迟直接启动 ## 在crontab.list中除掉每小时上述时间启动的任务外其他任务在你定义了 RandomDelay 的情况下,一律启用随机延迟,但如果你给某些任务添加了 "now" 或者 "conc",那么这些任务也将无视随机延迟直接启动
RandomDelay="300" RandomDelay="300"
## 如果你自己会写shell脚本并且希望在每次运行 update 命令时,额外运行你的 shell 脚本,请赋值为 "true" ## 如果你自己会写shell脚本并且希望在每次运行 ql update 命令时,额外运行你的 shell 脚本,请赋值为 "true"
## 同时,请务必将你的脚本命名为 extra.sh (只能叫这个文件名),放在 config 目录下
EnableExtraShell="" EnableExtraShell=""
## 自动按顺序进行账号间互助(选填) 设置为 true 时将直接导入code最新日志来进行互助 ## 自动按顺序进行账号间互助(选填) 设置为 true 时将直接导入code最新日志来进行互助