craylord
asked on
Script to restart server if pinging gateway fails.
I'm looking for a script that will run in the background that will check to see if the gateway is pingable. If not, it sends a reboot command. shutdown /f
This is for a Windows 2003 server that is continously dropping its network connections due to an issue with an application. This should be a windows batch file. I don't have the time to mess with another language. Something simple enough where I can test by unplugging the network cable and see the process in action. Thank you!
This is for a Windows 2003 server that is continously dropping its network connections due to an issue with an application. This should be a windows batch file. I don't have the time to mess with another language. Something simple enough where I can test by unplugging the network cable and see the process in action. Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is there any easy way to query the gateway so it doesn't have to be hard coded?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I went with the default ping (4 response checks). I also configured to run it as a service. ty very much.
Hello Experts...
I need a script that pings some ip, if this ip is unreacheable than the script will delete some static routes. When the IP is reachble again the routes needs to be add again.
Anybody knows a way ?
Regargs
Tullio
I need a script that pings some ip, if this ip is unreacheable than the script will delete some static routes. When the IP is reachble again the routes needs to be add again.
Anybody knows a way ?
Regargs
Tullio
ping servername
if %errorlevel%==1 shutdown /f /r /t 30
will give you a 30 second timer, and force all open apps to close...