If you're doing asp.net, it's definitely going to use IIS.
If you want to add a timed task to the ASP.net application, you must be using a thread to do the timed calculation continuously
Let's assume that we've added the quartz.net framework to our ASP.net application and that the configuration and so on are OK.
This site a small number of visits, now only a few people to work only then use, the results of the next day to see, the background scheduling of the thread and computing tasks are stopped, if you crawl the Application_End event, you will find this incident incredibly called.
That must be the mechanism of application pool recycling for IIS. Because of the default settings for IIS, if a site is in an application pool that has not been accessed or requested for more than a period of time, IIS automatically reclaims the program pool and kills the process. The threads in the process are certainly not going to survive.
But we can set the application pool parameters so that it will not be automatically recycled (some cases can not be avoided, such as hot-deployed sites, error number overrun, etc.)
In IIS, find the program pool used in this site, click "Advanced Settings ..."
In the open list, change the following settings:
Recycle--Fixed time interval (minutes) is changed to 0
--Virtual/private memory limit (KB) to 0
Process Model-idle timeout (minutes) to 0
This way, in general, the program pool will not be automatically recycled, the background of some simple calculation thread will work properly