Here's something I found:
:pingtheserver
ping %input% | find "Reply" > nul
if not errorlevel 1 (
echo server is online, up and running.
) else (
echo host has been taken down wait 3 seconds to refresh
ping 1.1.1.1 -n 1 -w 3000 >NUL
goto :pingtheserver
)
Note that ping 1.1.1.1 -n -w 1000 >NUL
will wait 1 second but only works when connected to a network