I'm now going to translate the content you provided. Please refer to the following:
The text you provided is in Chinese, and here is the translation:
I now need a batch processing. Starting from the current time, run a command after a specified time. I found the following batch processing program on the Internet, but it has a problem that it can't run correctly when the time is 0*:** because 0*+1 can't be added up. For example, when it's 08:30 in the morning, it can't run correctly, but it works after 10 o'clock because then adding 1 can be done, that is, the problem of the first number in the hour position being 0. How to solve this problem? Please help the experts modify the following batch processing so that it can be used within 24 hours a day, or provide other batch processing programs that meet my requirements. Thank you.
@echo off
setlocal ENABLEDELAYEDEXPANSION
set /a next_hour=0
set /a next_minute=0
for /F "tokens=1,2 delims=:" %%i in ('TIME /t') do (
rem Here 1 is the interval time, which can be adjusted according to your needs
set /a next_minute=%%j+1
set /a next_hour=%%i+1
if !next_minute! GEQ 60 (
set /a next_minute=!next_minute!-60
set /a next_hour=!next_hour!+1
if !next_hour! GEQ 24 set /a next_hour=!next_hour!-24
)
)
at !next_hour!:!next_minute! d:\common\d.vbs
schtasks /delete /tn "zhang" /f
endlocal
The text you provided is in Chinese, and here is the translation:
I now need a batch processing. Starting from the current time, run a command after a specified time. I found the following batch processing program on the Internet, but it has a problem that it can't run correctly when the time is 0*:** because 0*+1 can't be added up. For example, when it's 08:30 in the morning, it can't run correctly, but it works after 10 o'clock because then adding 1 can be done, that is, the problem of the first number in the hour position being 0. How to solve this problem? Please help the experts modify the following batch processing so that it can be used within 24 hours a day, or provide other batch processing programs that meet my requirements. Thank you.
@echo off
setlocal ENABLEDELAYEDEXPANSION
set /a next_hour=0
set /a next_minute=0
for /F "tokens=1,2 delims=:" %%i in ('TIME /t') do (
rem Here 1 is the interval time, which can be adjusted according to your needs
set /a next_minute=%%j+1
set /a next_hour=%%i+1
if !next_minute! GEQ 60 (
set /a next_minute=!next_minute!-60
set /a next_hour=!next_hour!+1
if !next_hour! GEQ 24 set /a next_hour=!next_hour!-24
)
)
at !next_hour!:!next_minute! d:\common\d.vbs
schtasks /delete /tn "zhang" /f
endlocal
