add start 手动 (menu测试

This commit is contained in:
2023-07-31 22:24:56 +08:00
parent 732be71a35
commit e31b5dc739
2 changed files with 10 additions and 7 deletions

View File

@@ -28,13 +28,15 @@ async function CheckUpdate() {
let all = await getSub()
for (let i of all) {
let time = i.time.split(":")
if (hours == time[0] && minutes == time[1]) {
if (hours == time[0] && minutes == time[1] || global.start) {
addDown(i)
}
}
global.start = false
}
console.log("开始定时检测更新")
// 设置定时器 每分钟检测更新
global.start = false
let job = schedule.scheduleJob('0 * * * * *', () => {
CheckUpdate()
});