测试定时器

This commit is contained in:
ZJY 2021-09-07 00:57:04 +08:00
parent 96e183c35d
commit 61bde665d2
2 changed files with 1 additions and 3 deletions

View File

@ -31,5 +31,5 @@ func init() {
InitReplies()
initTask()
initRepos()
//intiSky()
intiSky()
}

View File

@ -8,11 +8,9 @@ import (
func intiSky() {
log.Println("Starting...")
c := cron.New() // 新建一个定时任务对象
c.AddFunc("0 47 0/12 * * *", func() {
log.Println("hello world")
}) // 给对象增加定时任务
c.Start()
select {}
}