feat: update schedule

This commit is contained in:
lyz05
2022-12-14 10:58:30 +08:00
parent 3e91af13cd
commit 3c88d5ef7c
2 changed files with 10 additions and 10 deletions

View File

@@ -71,15 +71,15 @@ async function main() {
} else console.log('无余量');
// 遍历每个接种站尚有余额之时段
for (const item of quotalist) {
const { location } = await getlocationbyidtype(item.idtype)
const { periodlist } = await GetLocationPeriodByIdtype(item.idtype)
if (periodlist.length != 0) {
const name = location[0].name_c;
const periodlisttext = periodlist.map(l => `${l.booktime} 餘額 : ${l.ava_quota}`)
bot.sendMessage(chatID, name + '\n' + periodlisttext.join('\n'));
}
}
// for (const item of quotalist) {
// const { location } = await getlocationbyidtype(item.idtype)
// const { periodlist } = await GetLocationPeriodByIdtype(item.idtype)
// if (periodlist.length != 0) {
// const name = location[0].name_c;
// const periodlisttext = periodlist.map(l => `${l.booktime} 餘額 : ${l.ava_quota}`)
// bot.sendMessage(chatID, name + '\n' + periodlisttext.join('\n'));
// }
// }
}

View File

@@ -33,7 +33,7 @@ module.exports = (app) => {
});
});
});
cron.schedule("*/5 * * * *", () => {
cron.schedule("*/2 * * * *", () => {
covidbook();
});
};