【发布时间】:2023-02-24 02:44:06
【问题描述】:
这是我在批处理文件中无限运行的 for 循环
FOR /L %%N IN () DO (
curl.exe http://localhost:8080/java_service/health_check
IF NOT ERRORLEVEL 0 (
echo "Service is down. Please check sgw_service.log for more info. " >> C:\data\logs\java_service.log
exit // THIS exit is NOT working, loop is still spinning
)
)
还有其他方法可以退出此循环吗?
【问题讨论】:
标签: windows batch-file