iot_server/internal/pkg/crontab/cron.go

20 lines
192 B
Go
Raw Normal View History

2023-08-28 06:49:44 +00:00
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()
}