Skip to content

Commit

Permalink
Update the readme for recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
robfig committed Jul 20, 2012
1 parent bd4b092 commit 0de5d29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Callers may register Funcs to be invoked on a given schedule. Cron will run
them in their own goroutines.

```go
c := new(Cron)
c.Add("0 5 * * * *", func() { fmt.Println("Every 5 minutes") })
c.Add("@hourly", func() { fmt.Println("Every hour") })
c := cron.New()
c.AddFunc("0 5 * * * *", func() { fmt.Println("Every 5 minutes") })
c.AddFunc("@hourly", func() { fmt.Println("Every hour") })
c.Start()
..
// Funcs are invoked in their own goroutine, asynchronously.
...
// Funcs may also be added to a running Cron
c.Add("@daily", func() { fmt.Println("Every day") })
c.AddFunc("@daily", func() { fmt.Println("Every day") })
..
c.Stop() // Stop the scheduler (does not stop any jobs already running).
```
Expand Down

0 comments on commit 0de5d29

Please sign in to comment.