diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-11-14 15:12:30 -0500 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-11-14 15:12:30 -0500 |
commit | 437dd5272f557ffa3367a70230feeb1aa448b0e4 (patch) | |
tree | a2a69688e94b44418682668e19146c4f0456fde3 | |
parent | 9dc3c93a6a1f0d604aa5e4408a4c43c29b963b0c (diff) | |
parent | 6bdb8ec4b96fb2f16222cb7f5e6bf356e70b3fdc (diff) | |
download | gitea-437dd5272f557ffa3367a70230feeb1aa448b0e4.tar.gz gitea-437dd5272f557ffa3367a70230feeb1aa448b0e4.zip |
Merge pull request #626 from skibum55/dev
Add function argument missing
-rw-r--r-- | modules/cron/doc.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/cron/doc.go b/modules/cron/doc.go index dbdf50127a..258fe1eff8 100644 --- a/modules/cron/doc.go +++ b/modules/cron/doc.go @@ -7,9 +7,9 @@ Callers may register Funcs to be invoked on a given schedule. Cron will run them in their own goroutines. c := cron.New() - c.AddFunc("0 30 * * * *", func() { fmt.Println("Every hour on the half hour") }) - c.AddFunc("@hourly", func() { fmt.Println("Every hour") }) - c.AddFunc("@every 1h30m", func() { fmt.Println("Every hour thirty") }) + c.AddFunc("Every hour on the half hour","0 30 * * * *", func() { fmt.Println("Every hour on the half hour") }) + c.AddFunc("Every hour","@hourly", func() { fmt.Println("Every hour") }) + c.AddFunc("Every hour and a half","@every 1h30m", func() { fmt.Println("Every hour thirty") }) c.Start() .. // Funcs are invoked in their own goroutine, asynchronously. |