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