Code: Select all
set timewanted=%time%+1
where the plus one stands for one minute I want to add...
I need this so that later it can do
Code: Select all
at %timewanted% /interactive (commands)
Moderator: DosItHelp
Code: Select all
set timewanted=%time%+1
Code: Select all
at %timewanted% /interactive (commands)
Code: Select all
@echo off
for /f "tokens=1-4 delims=:. " %%a in ("%time%") do (
set "hr=%%a"
set /a min=100%%b %% 100 +1
set "sec=%%c"
set "dec=%%d"
)
set "min=0%min%"
if %min%==060 (
set "min=00"
set /a hr=100%hr% %% 100 +1
)
set "hr=%hr%
if /i "%hr%"=="24" set "hr=0"
::Not sure the format of time that "at" wants so you'll
::have to figure it out.
set "timewanted=%hr%:%min:~-2%:%sec%.%dec%"
set "timewanted=%hr%:%min:~-2%:%sec%"
echo.%timewanted%