This commit is contained in:
chaosBreaking
2019-09-29 09:45:19 +08:00
parent 5021a22daa
commit a1be616abc
4 changed files with 4 additions and 7 deletions

View File

@@ -76,11 +76,6 @@ const jobs = [
name: 'mine',
processor: async (job, done) => {
//todo: 程序内检查是否可以执行,保证不会启动时错误的自动执行一次
const now = new Date();
if (now.getHours() !== 23 && now.getMinutes() < 58) {
mylog.error('[Schedule Job] 不在合理时间启动...程序结束');
return done();
}
mylog.info('[Schedule Job] 开始定时计算作业...');
let currentIndex = await system.findOne({
key: 'userIndex4job'
@@ -106,7 +101,7 @@ const jobs = [
job.touch();
}
mylog.info('收益计算分配完成');
done();
done('收益计算分配完成');
},
type: 'every',
slot: '0 0 3 * * *',