package task import ( "github.com/robfig/cron" "server/edge/camera" ) func TimeTasks() { c := cron.New() //每3分钟监测状态 _ = c.AddFunc("0 */3 * * * ?", func() { //检查摄像头是否在线 camera.TestCameraOnline(camera.CameraDevices) }) c.Start() }