1. 项目地址:
    https://github.com/robfig/cron
  2. 用法:
    package main
    import (
     "fmt"
     "github.com/robfig/cron/v3"
    )
    func main() {
     ch := make(chan int)
     c := cron.New(cron.WithSeconds())
     c.AddFunc("* * * * * *", func() {
         fmt.Println("one")
     })
     c.AddFunc("* * * * * *", func() {
         fmt.Println("two")
     })
     c.AddFunc("* * * * * *", func() {
         fmt.Println("three")
     })
     c.Start()
     <- ch
    }
文档更新时间: 2020-08-07 18:49   作者:lee