mirror of https://github.com/go-gitea/gitea.git
Merge pull request #626 from skibum55/dev
Add function argument missing
This commit is contained in:
commit
437dd5272f
|
@ -7,9 +7,9 @@ Callers may register Funcs to be invoked on a given schedule. Cron will run
|
||||||
them in their own goroutines.
|
them in their own goroutines.
|
||||||
|
|
||||||
c := cron.New()
|
c := cron.New()
|
||||||
c.AddFunc("0 30 * * * *", func() { fmt.Println("Every hour on the half hour") })
|
c.AddFunc("Every hour on the half hour","0 30 * * * *", func() { fmt.Println("Every hour on the half hour") })
|
||||||
c.AddFunc("@hourly", func() { fmt.Println("Every hour") })
|
c.AddFunc("Every hour","@hourly", func() { fmt.Println("Every hour") })
|
||||||
c.AddFunc("@every 1h30m", func() { fmt.Println("Every hour thirty") })
|
c.AddFunc("Every hour and a half","@every 1h30m", func() { fmt.Println("Every hour thirty") })
|
||||||
c.Start()
|
c.Start()
|
||||||
..
|
..
|
||||||
// Funcs are invoked in their own goroutine, asynchronously.
|
// Funcs are invoked in their own goroutine, asynchronously.
|
||||||
|
|
Loading…
Reference in New Issue