refactor: 更新 CheckRssJob 函数以每5分钟执行一次 RSS 检查
This commit is contained in:
parent
3b4e8a40c3
commit
d0c62e1abd
@ -26,10 +26,10 @@ func CheckRssJob() {
|
||||
//每个整5分钟执行一次
|
||||
for {
|
||||
now := time.Now()
|
||||
if now.Minute()%30 == 0 {
|
||||
if now.Minute()%5 == 0 {
|
||||
go CheckNewRss()
|
||||
}
|
||||
nextAwake := 30 - now.Minute()%30
|
||||
nextAwake := 5 - now.Minute()%5
|
||||
time.Sleep(time.Minute * time.Duration(nextAwake))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user