Created
September 8, 2014 22:43
-
-
Save ota42y/d8c0d2426bb5dc0cf9e9 to your computer and use it in GitHub Desktop.
github.com/robfig/cronの動作テスト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/robfig/cron" | |
"time" | |
) | |
func main() { | |
c := cron.New() | |
c.AddFunc("*/1 * * * * *", func() { fmt.Println("1 second!") }) | |
c.AddFunc("0 */1 * * * *", func() { fmt.Println("1 minues!") }) | |
c.Start() | |
for { | |
time.Sleep(10000000000000) | |
fmt.Println("sleep") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment