Skip to content

Commit

Permalink
docs: add stop and stopBlockingChan function (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfyiamcool authored Sep 4, 2023
1 parent 36c534a commit af55934
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ s.CronWithSeconds("*/1 * * * * *").Do(task) // every second
s.StartAsync()
// starts the scheduler and blocks current execution path
s.StartBlocking()

// stop the running scheduler in two different ways:
// stop the scheduler
s.Stop()

// stop the scheduler and notify the `StartBlocking()` to exit
s.StopBlockingChan()
```

For more examples, take a look in our [go docs](https://pkg.go.dev/github.com/go-co-op/gocron#pkg-examples)
Expand Down

0 comments on commit af55934

Please sign in to comment.