func Stop(c *cron.Cron, wg *sync.WaitGroup) { log.Println("Stopping") c.Stop() log.Println("Waiting") wg.Wait() log.Println("Exiting") os.Exit(0) }
func scheduleMetric(c *cron.Cron, schedule string, fct func()) { c.AddFunc(schedule, fct) if strings.HasPrefix(schedule, "@every") { fct() } }
func Start(c *cron.Cron) { c.Start() }
func start(c *cron.Cron, wg *sync.WaitGroup) { c.Start() }