// 允许调用AddFunc时传额外的参数
c := cron.New()
err := c.AddFunc(item.Spec, func(e *cron.Entry) {
fmt.Println(e.Param.(string)) // output "hello"
}, "hello")
c.Start()
forked from robfig/cron
-
Notifications
You must be signed in to change notification settings - Fork 0
a cron library for go; job 方法可以传参
License
molizz/cron
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
a cron library for go; job 方法可以传参
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Go 100.0%