c8924c625c
- Replace /MIN (hidden window) with normal windows so errors are visible - Redirect stderr to logs/*.log for post-mortem - Extract killport/wait_health/wait_port into callable helpers - Use !N! (delayed expansion) for retry counters - stop.bat now shows which PIDs it kills with port labels - Remove nested-quote issue by cd'ing before npm start
28 lines
871 B
Batchfile
28 lines
871 B
Batchfile
@echo off
|
|
chcp 65001 >nul
|
|
echo ================================================
|
|
echo 停止所有 agent_jrxml 服务
|
|
echo ================================================
|
|
|
|
echo [停止] 按窗口标题清理...
|
|
taskkill /F /FI "WINDOWTITLE eq jrxml-validator*" 2>nul
|
|
taskkill /F /FI "WINDOWTITLE eq jrxml-api*" 2>nul
|
|
taskkill /F /FI "WINDOWTITLE eq jrxml-frontend*" 2>nul
|
|
|
|
echo [停止] 按端口清理...
|
|
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8000.*LISTENING"') do (
|
|
echo 端口 8000 - PID %%a
|
|
taskkill /F /PID %%a >nul 2>&1
|
|
)
|
|
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8001.*LISTENING"') do (
|
|
echo 端口 8001 - PID %%a
|
|
taskkill /F /PID %%a >nul 2>&1
|
|
)
|
|
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":5173.*LISTENING"') do (
|
|
echo 端口 5173 - PID %%a
|
|
taskkill /F /PID %%a >nul 2>&1
|
|
)
|
|
|
|
echo 已停止
|
|
pause
|