Difference between revisions of "DOS Timer"

From PeformIQ Upgrade
Jump to navigation Jump to search
(New page: =BAT File= <pre> @ECHO OFF for /F "tokens=2-4 delims=/ " %%a in ('date /t') do (set date=%%c%%b%%a) for /F "tokens=1-3 delims=: " %%a in ('time /t') do (set time=%%a%%b%%c) TaskLIST | FIN...)
 
Line 21: Line 21:
</pre>
</pre>


This uses the program - SleepMilliseconds.exe
This uses the program - [http://www.performiq.com.au/kb/images/SleepMilliseconds.exe SleepMilliseconds.exe]

Revision as of 11:05, 17 April 2008

BAT File

@ECHO OFF
for /F "tokens=2-4 delims=/ " %%a in ('date /t') do (set date=%%c%%b%%a)
for /F "tokens=1-3 delims=: " %%a in ('time /t') do (set time=%%a%%b%%c)
TaskLIST | FIND /i "SleepMilliseconds.exe" > NUL 2>&1
IF ERRORLEVEL 1 GOTO NOTRUNNING

:RUNNING
ECHO %date% %time% Failed to lauch SleepMilliseconds.exe A task of this name already exists in the task list >> sleeplog.log
GOTO END

:NOTRUNNING
ECHO %date% %time% Starting SleepMilliseconds.exe 10000 >> sleeplog.log
SleepMilliseconds.exe 10000
ECHO %date% %time% SleepMilliseconds.exe finished >> sleeplog.log
GOTO END

:END

This uses the program - SleepMilliseconds.exe