Execute method in global.asax every few minutes

前端 未结 3 1624
抹茶落季
抹茶落季 2020-12-21 04:29

What is the most effective way to execute a method in the Global.asax file every x number of minutes? Is there a way to have the ASP.NET server run a background thread that

3条回答
  •  心在旅途
    2020-12-21 05:22

    Put a System.Timers.Timer object in Application_Start () in Global.asax.

    http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx

提交回复
热议问题