diff --git a/solarApp/fmArchive.cs b/solarApp/fmArchive.cs index e7db969..1ef2021 100644 --- a/solarApp/fmArchive.cs +++ b/solarApp/fmArchive.cs @@ -117,7 +117,7 @@ namespace solarApp } //異常處理 每 5分鐘跑一次 - if ((DateTime.Now.Minute % 5) == 0 && autoTask == false) + if ((DateTime.Now.Minute % 5) == 0 && (DateTime.Now.Second) < 30 && autoTask == false) { autoTask = true; lbMsgTitle.Text = "異常處理 " + DateTime.Now.ToString() + " timer start"; @@ -306,7 +306,6 @@ namespace solarApp sensorSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); invSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); siteSvc.archiveData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); - invSvc.report_invDay(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); } } sensorSvc.isFirst = true; @@ -317,6 +316,7 @@ namespace solarApp { sensorSvc.archiveSensorHistoryHourData(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); sensorSvc.isFirst = false; + invSvc.report_invDay(item.SiteID.Substring(0, 9), day.ToString("yyyy-MM-dd")); } } autoTask = true;