如何保持石英.net的调度程序存活?
问题描述:
我在asp网站上使用石英,我在application_start方法中初始化了调度程序,并在application_end方法中关闭了,我的触发器每天都会触发,但是我发现如果没有一段时间请求,我的调度程序会自动关闭,所以我的背景工程不会被触发,有没有更好的方法可以使调度程序寿命更长,并且只有在服务器停止时才关闭?
I use quartz in my asp website, i initialize the scheduler in application_start method and shutdown in application_end method ,my trigger will fire everyday but I found that my scheduler will automatically shutdown if there are not request for a while ,so my background works will not triggered,are there any better way to keep the scheduler life long and only shutdown when the server stopped?
答
为了更好地共享知识:
有两个建议:
- http://www.codeproject.com/Articles/12117/Simulate-a-Windows-Service-using-ASP-NET-to-run-sc
- http://weblog.west-wind.com/posts/2007/May/10/Forcing-an-ASPNET-Application-to-stay-alive
- http://www.codeproject.com/Articles/12117/Simulate-a-Windows-Service-using-ASP-NET-to-run-sc
- http://weblog.west-wind.com/posts/2007/May/10/Forcing-an-ASPNET-Application-to-stay-alive