Skip to content

Commit

Permalink
add blocking example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRoesler committed Jan 17, 2024
1 parent 800821c commit 86d0063
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ func main() {
// start the scheduler
s.Start()

// block until you are ready to shut down
select {
case <-time.After(time.Minute):
}

// when you're done, shut it down
err = s.Shutdown()
if err != nil {
Expand Down

0 comments on commit 86d0063

Please sign in to comment.