From a189bcc2f46b51116c5acc78fd01beedffc4c4a3 Mon Sep 17 00:00:00 2001 From: cesar liu Date: Thu, 18 Aug 2022 10:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=B0=E5=B8=B8=E8=B3=87=E6=96=99=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=20=E6=AF=8F=205=E5=88=86=E9=90=98=E8=87=AA=E5=8B=95?= =?UTF-8?q?=E5=9F=B7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solarApp/fmArchive.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/solarApp/fmArchive.cs b/solarApp/fmArchive.cs index a5f41a2..2f41d56 100644 --- a/solarApp/fmArchive.cs +++ b/solarApp/fmArchive.cs @@ -18,6 +18,7 @@ namespace solarApp getStationSvc stationSvc = new getStationSvc(); System.Timers.Timer _timer; bool autoTask = false; //測試自動跑 irrDayHour 累計日照小時差異 + procSyncError svc = new procSyncError(); // 異常資料同步 public fmArchive() { InitializeComponent(); @@ -112,6 +113,16 @@ namespace solarApp //bt_archive_Click.PerformClick(); } + //異常處理 每 5分鐘跑一次 + if ((DateTime.Now.Minute % 5) == 0 && autoTask == false) + { + lbMsgTitle.Text = DateTime.Now.ToString() + " timer start"; + btSyncErr.PerformClick(); + autoTask = true; + //bt_archive_Click.PerformClick(); + } + + //臨時的 累計日照 //if (DateTime.Now.Minute == 30 && (DateTime.Now.Second >= 0 && DateTime.Now.Second <= 10) && autoTask == false) //{ @@ -703,7 +714,7 @@ namespace solarApp private void btSyncErr_Click(object sender, EventArgs e) { - procSyncError svc = new procSyncError(); + svc.syncErrData(); }