Преглед на файлове

wifi订单交易统计定时执行时间限制

lcl преди 11 месеца
родител
ревизия
805d558d23
променени са 1 файла, в които са добавени 8 реда и са изтрити 5 реда
  1. 8 5
      AppStart/WifiTradeHelper.cs

+ 8 - 5
AppStart/WifiTradeHelper.cs

@@ -28,12 +28,15 @@ public class WifiTradeHelper
         {
             try
             {
-                string Month = DateTime.Now.ToString("yyyyMM");
-                string chk = function.ReadInstance("/wifi/trade" + Month + ".txt");
-                if(string.IsNullOrEmpty(chk))
+                if(DateTime.Now.Day == 1 && DateTime.Now.Hour < 6)
                 {
-                    function.WritePage("/wifi/", "trade" + Month + ".txt", DateTime.Now.ToString());
-                    DoSomething(Month);
+                    string Month = DateTime.Now.ToString("yyyyMM");
+                    string chk = function.ReadInstance("/wifi/trade" + Month + ".txt");
+                    if(string.IsNullOrEmpty(chk))
+                    {
+                        function.WritePage("/wifi/", "trade" + Month + ".txt", DateTime.Now.ToString());
+                        DoSomething(Month);
+                    }
                 }
                 Thread.Sleep(3600000);
             }