示例#1
0
        /// <summary>
        /// 跨店奖励主程序入口
        /// 徐鹏程
        /// 20150421
        /// </summary>
        public void Execute(IJobExecutionContext context)
        {
            SubsidyProvider CrossShop = new SubsidyProvider();

            ETS.Util.LogHelper.LogWriter(DateTime.Now.ToString() + "短信发送开始");
            CrossShop.ShortMessage();
            ETS.Util.LogHelper.LogWriter(DateTime.Now.ToString() + "短信发送完成");
        }
 /// <summary>
 /// 跨店奖励主程序入口
 /// 徐鹏程
 /// 20150414
 /// </summary>
 public static void ShortMessage()
 {
     while (true)
     {
         if (DateTime.Now.Hour == ETS.Config.StartSubsidyTime)
         {
             SubsidyProvider CrossShop = new SubsidyProvider();
             ETS.Util.Log.WriteTextToFile("/r/n" + DateTime.Now.ToString() + "短信发送开始", GetLogFilePath(), true);
             CrossShop.ShortMessage(ETS.Config.SendMessage);
             ETS.Util.Log.WriteTextToFile("/r/n" + DateTime.Now.ToString() + "短信发送完成", GetLogFilePath(), true);
         }
         Thread.Sleep(1000 * 60 * 60);
     }
 }