Morning all (well it is where I am anyway)
I have a small problem. I'm currently running a small webserver of my home internet connection and due to various reasons which I havn't worked out yet the machine seems to keep freezing, or at least it stops responding to pings and remote desktop connection attempts.
What I am looking to do is have a batch file run as a schedulded task that would PING from the local machine to its ip address. If it thens recieves dropped packets, it would call the SHUTDOWN -R command to reboot the box automatically.
Now my problem comes here.
How do I get the batch file to recognise that the PING attempt has failed and allow the SHUTDOWN command to run? I'm planning on using IF for the test itself, but i'm unsure of how to get it to look for the failed PING.
Any ideas?
Cheers
FireExit
I have a small problem. I'm currently running a small webserver of my home internet connection and due to various reasons which I havn't worked out yet the machine seems to keep freezing, or at least it stops responding to pings and remote desktop connection attempts.
What I am looking to do is have a batch file run as a schedulded task that would PING from the local machine to its ip address. If it thens recieves dropped packets, it would call the SHUTDOWN -R command to reboot the box automatically.
Now my problem comes here.
How do I get the batch file to recognise that the PING attempt has failed and allow the SHUTDOWN command to run? I'm planning on using IF for the test itself, but i'm unsure of how to get it to look for the failed PING.
Any ideas?
Cheers
FireExit