修改任务启动参数

This commit is contained in:
whyour 2022-09-21 21:28:31 +08:00
parent ae891f8e55
commit 36f4c3c02c
5 changed files with 7 additions and 13 deletions

View File

@ -17,7 +17,7 @@ async function startServer() {
const server = app
.listen(config.port, () => {
Logger.debug(`✌️ Back server launched on port ${config.port}`);
Logger.debug(`✌️ 后端服务启动成功!`);
})
.on('error', (err) => {
Logger.error(err);

View File

@ -18,13 +18,12 @@ export default async () => {
tokenCommand = `node ${tokenFile}`;
}
const cron = {
id: 'token',
id: NaN,
name: '生成token',
command: tokenCommand,
};
scheduleService.createIntervalTask(cron as any, {
scheduleService.createIntervalTask(cron, {
days: 28,
runImmediately: true,
});
// 运行删除日志任务
@ -37,7 +36,6 @@ export default async () => {
};
scheduleService.createIntervalTask(cron, {
days: data.info.frequency,
runImmediately: true,
});
}

View File

@ -22,7 +22,7 @@ app
await require('./loaders/sentry').default({ expressApp: app });
await require('./loaders/db').default();
Logger.debug(`✌️ Back server launched on port ${config.publicPort}`);
Logger.debug(`✌️ 公共服务启动成功!`);
})
.on('error', (err) => {
Logger.error(err);

View File

@ -44,11 +44,7 @@ app
await require('./loaders/db').default();
await run();
Logger.info(`
################################################
🛡 Schedule listening on port: ${config.cronPort} 🛡
################################################
`);
Logger.debug('定时任务服务启动成功!');
})
.on('error', (err) => {
Logger.error(err);

View File

@ -42,13 +42,13 @@ echo -e "定时任务启动成功...\n"
if [[ $AutoStartBot == true ]]; then
echo -e "======================7. 启动bot========================\n"
nohup ql bot >>$dir_log/start.log 2>&1 &
nohup ql bot >>$dir_log/bot.log 2>&1 &
echo -e "bot后台启动中...\n"
fi
if [[ $EnableExtraShell == true ]]; then
echo -e "======================8. 执行自定义脚本========================\n"
nohup ql extra >>$dir_log/start.log 2>&1 &
nohup ql extra >>$dir_log/extra.log 2>&1 &
echo -e "自定义脚本后台执行中...\n"
fi