Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule a command line task - advanced

Status
Not open for further replies.

SiCranmer

Programmer
Joined
Jan 31, 2007
Messages
4
Location
GB
OK, ive tried and tried and its now driving me mad....

i have a bat file i want executing between 8am & 6pm Mon-Fri every 30 mins. i can set this up within the scheduler by using the advanced tab and setting the until time. From here the schedule reads “Every 30 mins from 8:00 for 630 minutes every Mon,Tue,Wed,Thu,Fri of every week starting 31/01/2007”.

My problem is that I have to create the requests on the fly. Found schtasks and Im 90% of the way there but I cannot find a way of stopping the script at 6pm so far my call reads

Code:
schtasks /create /tn CRON1 /tr C:\my_cron.bat /sc WEEKLY /d MON,TUE,WED,THU,FRI /st 08:00:00 /et 16:30:00 /ru usr /rp pwd

anyone any ideas… please…

TA
 
mmm its obvoiusly late I want to use the /et but it does not exists real comand is

Code:
schtasks /create /tn CRON1 /tr C:\my_cron.bat /sc WEEKLY /d MON,TUE,WED,THU,FRI /st 08:00:00 /ru usr /rp pwd
 
Try using /mo (modifier). I've never used it but it looks like you can set it run for however many hours you need. Again, I've never used it so I'm not that familiar with the limitations.
 
cheers,

Ive tried to use that but i canot find the correct modifier. looks like it only allows you to select the weekly repetition.
 
mmm its obvoiusly late I want to use the /et but it does not exists real comand is

Code:
schtasks /create /tn CRON1 /tr C:\my_cron.bat /sc WEEKLY /d MON,TUE,WED,THU,FRI /st 08:00:00 /ru usr /rp pwd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top