开发者

Automatically Restarting Website after IIS AppPool recyle

开发者 https://www.devze.com 2023-01-23 18:19 出处:网络
I\'m using a website which interacts with SQL Server Agent in order to schedule the automatic processing and emailing of reports.I recently noticed that when the AppPool recyles, that i\'m not getting

I'm using a website which interacts with SQL Server Agent in order to schedule the automatic processing and emailing of reports. I recently noticed that when the AppPool recyles, that i'm not getting reports afterwards - until someone logs into the website again. It's possible for the website not to get hit for hours/days, during which all the scheduled tasks are lost.

I'd like to set up a windows task to either run periodically or trigger off the AppPool recycle event. But I'm not sure what the task should be. I had one suggestion to set up a Windows task to exercise a .js script that would hit the website, but this only works with Windows Authentication (which isn't being used):

var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
xmlhttp.open("POST", "http://localhost/website/defa开发者_运维百科ult.aspx", false);
xmlhttp.send();

Looking for some suggestions on how to "wake up" a website after an IIS AppPool recycle.

Thanks. ab.


Why not run gnu wget from a scheduled task:

wget -O - http://mysite.com/default.aspx


I ran across this today which seems like it might help you out. It's the IIS Warm-up module. Depends on whether you can convince the your customer to install it, although it is an official IIS module, so hopefully it's no problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消