CODE: [Copy to clipboard]
@echo off
:lp
cls
echo.
setlocal enabledelayedexpansion
echo The time now is: %time%
echo.
set si[1]=%time%
echo Press any key to see the result.....
pause >nul
::Select var
set th[1]=!si[1]:~0,2!
rem select hour
set tm[1]=!si[1]:~3,2!
rem select minute
set ts[1]=!si[1]:~6,2!
rem select second
set tms[1]=!si[1]:~9,2!
rem select milisecond
:: add one minute to origin.
::[color=red]这里,你可以自己设定隔多久运行某个程序[/color]
set /a tm[1]%+=1
::Check output
if "%tm[1]%" equ "60" (set /a th[1]%+=1)
::[color=red]如果大于60分钟,就将小时数加一[/color]
echo.
echo The latest time is: %th[1]%:%tm[1]%:%ts[1]%
echo Attention,the xxx program will run at this time!
pause>nul
goto :lp