This commit is contained in:
zhangwenjian committed 2020-04-13 00:30:58 +08:00
1 parent f25da5f1ee
commit 1df55e75e5
72 files changed
+1401 -1559

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package cronjob
import (
"github.com/robfig/cron/v3"
"log"
)
func TestJob(c *cron.Cron) {
id, err := c.AddFunc("1 * * * *", func() {
log.Println("Every hour on the one hour")
})
if err != nil {
log.Println(err)
log.Println("start error")
} else {
log.Println("Start Success; ID: %v", id)
}
}