/gocron-graceful-exit

This is an example how to use goroutine and channel to wait for SIGINT or SIGTERM signal.

Primary LanguageGo

Gocron Graceful Exit

This is an example how to use goroutine and channel to wait for SIGINT or SIGTERM signal.

In this case, gocron already waits for the running tasks to complete before stopping. But if you're not using gocron, you might want to use waitgroup like on the first version here.