void objTimer_Elapsed(object sender, ElapsedEventArgs e) { GlenetCms.UI.GetInfo.InsertInfo(); }
void Application_Start(object sender, EventArgs e) { //在应用程序启动时运行的代码 System.Timers.Timer timer = new System.Timers.Timer(1000 * 3600);//执行间隔时间,单位为毫秒 timer.Elapsed += new System.Timers.ElapsedEventHandler(objTimer_Elapsed); timer.AutoReset = true; timer.Enabled = true; }