• asp.net 通过Global.asax 定时执行web应用中的的程序


     protected void Application_Start(object sender, EventArgs e)
            {
                System.Timers.Timer t = new System.Timers.Timer(3000000); //差不多办小时一次,比如10秒,就写10000
                 t.Enabled = true;
                 t.Elapsed += new System.Timers.ElapsedEventHandler(Interval);
                t.Start();
            }
            void Interval(object sender, System.Timers.ElapsedEventArgs e)
            {
                //添加自己的代码
                        OA.BLL.Duty bll = new OA.BLL.Duty();
                        bll.SetDuty();
                       

               
            }

           
              

  • 相关阅读:
    SpringMVC源码阅读(一)
    Struts2技术内幕-----第七章
    1118 Lining Up
    1146 ID Codes
    1056 IMMEDIATE DECODABILITY
    1028 Web Navigation
    1045 Bode Plot
    1083 Moving Tables
    并查集路径压缩
    线段树
  • 原文地址:https://www.cnblogs.com/Guroer/p/1614650.html
Copyright © 2020-2023  润新知