Link to home
Start Free TrialLog in
Avatar of donna decker
donna deckerFlag for Canada

asked on

restart W3SVC daily at 3:00 am

the reason I want to restart W3SVC .. I'm running a classic asp the has numerous W3SVC sessions being logged in. the W3SVC service doesn't seem to be releasing and do the task manager shows numberous sessions of W3SVC running.The .asp program starts to fail and gives a 500 error to the end user. The easy fix is to restart the W3SVC service which resolves the problem fo a while.. Soooo .. what I would like to do is restart the W3SVC service automatically at around 3am each day. I built a batch file and it works and added it to the task scheduler and it did run but now it's not listed any where and I can't see the results of the batch
Avatar of D Patel
D Patel
Flag of India image

Go to your task's properties, Actions, Edit and you will find it.

Also give the batch file rights to 'Run as Administrator...".

Also If you need command line code then it is here :
@echo off
REM - File: RestartIIS.bat

echo Restarting IIS...
echo ======================================================

net stop W3SVC
net start W3SVC

echo ======================================================
echo IIS Restarted

Open in new window


Copy it to notepad and save as "filename.bat".

Then schedule it again.

Regards,
D Patel
SOLUTION
Avatar of D Patel
D Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have any of these suggestions helped?

Dan