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