This batch file will get you most of the way. You will need to use blat or something similar or a Windows script to send email. Use the task scheduler to invoke the batch file every 30 minutes.
checkserver.bat:
@echo off
ping -n 1 %1 > NUL
IF ERRORLEVEL 0 (echo "Up -- Don't send email.") ELSE echo "Down -- Send email."
Call it like this:
C:\>checkserver 127.0.0.1
"Up -- Don't send email."
C:\>checkserver 128.0.0.1
"Down -- Send email."
source
share