I did this time delay script for fun.
I'd like to make it work and also, by considering the days.
For example, if it is currently 23h on 2011-03-31, and I set 2h 05 min delay , it will expire at 1h05 on 2011-04-01.
Also, that 24h would be 0h.
I'd like to have it all as a batch file.
Thanks for your help,
REM THIS IS ASSUMING THAT THE COUNT DOWN WILL FINNISH THE SAME DAY
REM W=WAIT T=TARGET EX.: WHour THour
REM SETTING UP TARGET TIME
FOR /F "tokens=1-3 delims=:, " %%A IN ("%TIME%") DO (
SET /a THour+=%%A + %WHour%
SET /a TMin+=%%B + %WMin%
SET /a TSec+=%%C + %WSec%
IF !TSec! GTR 60 (
SET /a TMin+=1
SET /A TSec-=60
IF !TMin! GTR 60 (
SET /a THour+=1
SET /A TMin-=60
IF !THour! GTR 23 (
REM WAITING FOR THE TARGET TIME TO COME
CHOICE /D Y /T 1 >NUL
ECHO %time% | Findstr -i "!THour!:!TMin!:!TSec!"
IF !errorlevel! NEQ 1 GOTO Home