iot_server/internal/pkg/crontab/cron.go

20 lines
192 B
Go

package crontab
import "github.com/robfig/cron/v3"
var (
Schedule *cron.Cron
)
func init() {
Schedule = cron.New()
}
func Start() {
Schedule.Start()
}
func Stop() {
Schedule.Stop()
}