@echo off
title 检查服务器是否启动
timeout /nobreak /t 2
:again
set ip=127.0.0.1
set port=8860
netstat -ano|findstr %ip%:%port%|findstr -i ESTABLISHED
if ERRORLEVEL 1 (goto err) else (goto ok)
:err
echo 服务未启动!!!
:ok
echo 执行时间 %Date:~0,4%-%Date:~5,2%-%Date:~8,2% %Time:~0,2%:%Time:~3,2%
ping -n 300 127.0.0.1 >nul
goto again