rtano Posted December 24, 2004 Share Posted December 24, 2004 I've made a bat for restarting IIS and scheduled it to run every 2 hours, (cuz i have to find a solution for an exchange prob, and i use this workaround as temporary solution for the problem) iisreset.bat start iisreset when the schedule starts it popup a LOT of Cmd windows (20-30 Windows) with the path of the script. Does anyone have any hint? BTW Meery Xmas to all Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/ Share on other sites More sharing options...
FuricTrax Posted December 24, 2004 Share Posted December 24, 2004 These other bat files might be for all the other services that depend on iis? I have some experience with Exchange. What is the actual problem that you need to keep restarting iis to fix Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/#findComment-585158676 Share on other sites More sharing options...
rtano Posted December 24, 2004 Author Share Posted December 24, 2004 the problem is related to the delivering of e-mail in the Lan, restarting IIS (for Smtp) it will deliver the mail succesfully, until i get to fix this problem(it seems that is related with the AV,,,Trend) i have to restart iis . The problem now is with the number of cmd windows that pops out when the bat is exeute. Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/#findComment-585158714 Share on other sites More sharing options...
Aaron P Posted December 24, 2004 Share Posted December 24, 2004 Is there a space in the path to the script? Try a path without spaces. Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/#findComment-585159067 Share on other sites More sharing options...
rtano Posted December 24, 2004 Author Share Posted December 24, 2004 no space in the script Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/#findComment-585159925 Share on other sites More sharing options...
+primortal Subscriber² Posted December 24, 2004 Subscriber² Share Posted December 24, 2004 if you are running iis 5 take a look at this http://www.microsoft.com/downloads/details...&DisplayLang=en for iis 6 try this vb code (just save it as iisrestart.vbs). change '2142295254' to your server name strComputer = "." Set objWMIService = GetObject _ ("winmgmts:{authenticationLevel=pktPrivacy}\\" _ & strComputer & "\root\microsoftiisv2") Set colItems = objWMIService.ExecQuery _ ("Select * From IIsWebServer Where Name = " & _ "'W3SVC/2142295254'") For Each objItem in colItems objItem.Start Next Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/#findComment-585159964 Share on other sites More sharing options...
+BudMan MVC Posted December 24, 2004 MVC Share Posted December 24, 2004 if its the smtp portion that is causing you issues, why not just stop and start the smtp service? Why do you need to reset all of IIS? net stop servicename net start servicename or you could use sc stop servicename sc start servicename Or if your really having issues and the service is hanging, why not just set the service to restart on failure - and then kill it every 2 hours? Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/#findComment-585160636 Share on other sites More sharing options...
rtano Posted December 25, 2004 Author Share Posted December 25, 2004 nice ideas....when i return from holidays i will try it. @primortal......What that vbs will do??? Link to comment https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/#findComment-585164266 Share on other sites More sharing options...
Recommended Posts