Closed zhuliquan closed 12 months ago
according to README.md, this package support standard crontab expr
README.md
Howevery, I find some expr run error.
For example. expr * * * * * means run every minute in standard crontab expr. (you can check meaning of crontab expr on this website). But in this package, I find it run every second. I'am very confused.
* * * * *
test code (in v1.2.0)
package main import ( "fmt" "time" "github.com/robfig/cron" ) func main() { job := cron.New() job.AddFunc("* * * * *", func() { fmt.Printf("run at %s\n", time.Now()) }) job.Start() select {} }
@zhuliquan note that you are not using the latest version Changing your import to import "github.com/robfig/cron/v3" should solve the problem
import "github.com/robfig/cron/v3"
according to
README.md
, this package support standard crontab exprHowevery, I find some expr run error.
For example. expr
* * * * *
means run every minute in standard crontab expr. (you can check meaning of crontab expr on this website). But in this package, I find it run every second. I'am very confused.test code (in v1.2.0)