Hi, How to create a job in task scheduler with specific interval (repeat time)? Upon visiting numerous sites I could manage to create a task for required time. But to set the interval of repeat? My script goes like this: Const MON = 1 Const TUE = 2 Const WED = 4 Const THU = 8 Const FRI = 16 Const SAT = 32 Const SUN = 64 strComputer = "." strCommand = "c:\TestLog.exe" strstartTime = "********233000.000000-000" boolRepeat = True intWeekDay = MON Or TUE Or WED Or THU Or FRI Or SAT Or SUN intMonthDay = "" boolInteract = True
Set objWMI = GetObject("winmgmts:\\" & strComputer & "") Set objNewTask = objWMI.Get("Win32_ScheduledJob") intRC = objNewTask.Create(strCommand, _ strstartTime, _ boolRepeat, _ intWeekDay, _ intMonthDay, _ boolInteract, _ intJobID) Now I want this task to execute every 30 minutes upto 11 PM.
How to do it? Please help. Any sort of help is appreciated. Thanks -Srinivas
|