Relative Content

Tag Archive for gocronmutex

Need help in preventing multiple crons/scheduler running in golang

I’m working on a Go microservice where I am using robfig/cron package to schedule jobs, initially thought of using time.Ticker() but package made it easier for me.
My question is how to ensure cron job is registered only once until the running cron completes and prevent multiple goroutines from running simultaneously.