要監控的服務名稱可到服務的內容查詢
於10.20.20.2 FTP SERVER上D槽建立CheckZFtpSrv.bat內容如下: ========================================= sc query "zFTPsvc" | find "RUNNING" > nul
if "%ERRORLEVEL%" == "0" (
ECHO myService is Already Existed and Runnin!
exit
) else (
::do something you want to do
net start "zFTPsvc"
)
==========================================
將批次檔加入WINDOWS排程執行設定每兩分鐘偵測一次
近期留言