From 8dfb8feb32bb5e4e460e23dcde42612a26fa2bcb Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期日, 27 八月 2023 01:11:28 +0800 Subject: [PATCH] fix --- crontask/cron_task.go | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crontask/cron_task.go b/crontask/cron_task.go index b50db4d..fd53267 100644 --- a/crontask/cron_task.go +++ b/crontask/cron_task.go @@ -11,7 +11,7 @@ func InitTask() error { s := gocron.NewScheduler(time.UTC) - _, err := s.Every(2).Seconds().StartImmediately().Do(func() { + _, err := s.Every(10).Seconds().StartImmediately().Do(func() { plcConfig, code := service.NewDevicePlcService().GetDevicePlc() if code != ecode.OK { return @@ -27,7 +27,7 @@ return err } - s.Every(1).Minutes().StartImmediately().Do(func() { + s.Every(59).Seconds().StartImmediately().Do(func() { plcConfig, code := service.NewDevicePlcService().GetDevicePlc() if code != ecode.OK { return -- Gitblit v1.8.0