From 583142e22b647955082ea61f8ee6b3641aaa903c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 19 九月 2023 14:16:55 +0800
Subject: [PATCH] 写plc 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 45072b2..9938bb4 100644
--- a/crontask/cron_task.go
+++ b/crontask/cron_task.go
@@ -24,7 +24,7 @@
 		totalNumberTimeInterval = 60
 	}
 	s := gocron.NewScheduler(time.UTC)
-	_, err := s.Every(finishNumberTimeInterval).Seconds().StartImmediately().Do(func() {
+	_, err := s.Every(finishNumberTimeInterval).Seconds().Do(func() {
 		plcConfig, code := service.NewDevicePlcService().GetDevicePlc()
 		if code != ecode.OK {
 			return
@@ -73,7 +73,7 @@
 
 	})
 
-	s.Every(60).Seconds().StartImmediately().Do(SyncProductionProgress) //鍚屾鐢熶骇鏁版嵁
+	s.Every(180).Seconds().Do(SyncProductionProgress) //鍚屾鐢熶骇鏁版嵁
 	s.StartAsync()
 	return nil
 }

--
Gitblit v1.8.0