i'm trying run bat file using 1 @ time whenever try, runs no matter what.
@echo off setlocal enableextensions enabledelayedexpansion ping www.google.com pause start "c:\program files (x86)\google\chrome\application\chrome.exe" "https://inbox.google.com" set tm=time set hh=!tm:~0,2! set mm=!tm:~3,2! if !hh! lss 19 ( goto :done ) if !hh! equ 19 ( if !mm! lss 45 ( goto :done ) ) start "" "c:\users\adminnus\desktop\dimmer.bat" :done endlocal
the error here: set tm=time line stores string time in variable %tm%. set hh=!tm:~0,2! stores ti in %hh% , on. fix have surround time %%:
set tm=%time% this should it.
Comments
Post a Comment