View Single Post
  #4 (permalink)  
Old 12-06-2008, 10:45 AM
MurkMenthaa MurkMenthaa is offline
Registered User
 
Join Date: Dec 2008
Posts: 2
MurkMenthaa is on a distinguished road
Re: Task Scheduler repeat task duration bug?

I don't know if this is needed anymore, but heres a workaround :

Suppose I have to run a task every 15 minutes from 8am to 8pm
i'll set my clock to show time in [B]24-HRS HH:mm[/B] format from regional settings in control panel.

Then I'll make a bat file that checks whether current time is between 8:00 and 20:00 hrs and put my task command there as follows

@echo off
FOR /F "tokens=*" %%R IN ('time /T') DO SET time=%%R
set HR=%time:~0,2%
if %HR% geq [B][U]8[/U][/B] if %HR% leq [B][U]19[/U][/B] goto main
goto exit
:main

rem put your desired command(s) here
rem for eg to run calculator, :
calc.exe

:exit
rem program ends here

see that 8 and 19 are bold and undrlined because i want task to run betweek 8 hrs and 20 hrs, so you can change those values accordingly.

I understand that OP may not be interested at all now, given it was asked a year ago but i just googled and found so many other posts about the same topic so I guess this might help someone.
Reply With Quote

 
Old 12-06-2008, 10:45 AM