:: You can add more check by adding more if's
@ECHO OFF
SET TASKNAME=PingAServer
for /f "tokens=1,2 delims= " %%i in ('schtasks /QUERY ^|findstr /i running') do (
IF "%%i"=="%TASKNAME%" (
ECHO %TASKNAME% RUNNING
GOTO EOF
)
)
ECHO NOTHING RUNNING
:EOF
:: Enjoy
Is task running
Bob Mihada, Monday, April 12, 2010
Subscribe to:
Post Comments (Atom)
Comments :
Post a Comment