Link to home
Start Free TrialLog in
Avatar of mgerosa
mgerosa

asked on

How can I set the duration of a scheduled task using schtask in WinXP?

Dear Experts,
I'm writing a command line batch that create a scheduled task. I can't use the GUI because I need to implement this batch to run on the remote computers of my company.
This task runs starting from 11:00 am until 19:00, every 2 hours.

My OS is Windows XP.
I used also in the past the easy command "schtasks". The problem is that I'm not able to set the duration of my scheduled task (all the other settings are not so difficult).
The problem is that the /DU option (to set the duration of the scheduled task) is no more available in WinXp (I guess most of you will answer me that this is actually the answer to my question ;-) ).
By the way, I really appreciate if you have an answer to my question! Maybe you know a way to set this parameter using a vb script....

I really don't believe that this parameter, that can be easily set up using the GUI, can not be done via command line...or I should think that "Microsoft Strikes Back"? ;-)

thank you very much!!
Marco
schtasks /Create /RU SYSTEM /TN EXPORT /TR "c:\doExport.bat" /SC HOURLY /MO 8 /ST 11:00:00 /SD 01/09/2009

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial