Schtasks.exe and Windows XP Service Pack 3

O

Oni

I try to schedule tasks from the command line, but am unable to use the
/du Duration and /et EndTime options.

I've Also been looking at Microsoft TechNet for more info but i'm still
unable to perform the following action.
http://technet.microsoft.com/en-us/library/cc772785.aspx

What i want to achieve, is to start and then end the specific task after 1
minute and then have it run again a minute later.

I can make it restart every 2 minutes if i shut it down manually or alter
the scheduled task GUI, but i'am not able to do this from the command line.

This works but does not perfom what i want:
schtasks /create /TN "My App" /TR xxx.exe /SC MINUTE /MO 2 /ST 04:45:00

This doesn't work at all:
SCHTASKS /CREATE /TN "My App" /TR cmd.exe /SC MINUTE /MO 2 /ST 04:45:00 /DU
0000:01


All help will be appreciated.
 
P

Pegasus \(MVP\)

Oni said:
I try to schedule tasks from the command line, but am unable to use the
/du Duration and /et EndTime options.

I've Also been looking at Microsoft TechNet for more info but i'm still
unable to perform the following action.
http://technet.microsoft.com/en-us/library/cc772785.aspx

What i want to achieve, is to start and then end the specific task after 1
minute and then have it run again a minute later.

I can make it restart every 2 minutes if i shut it down manually or alter
the scheduled task GUI, but i'am not able to do this from the command
line.

This works but does not perfom what i want:
schtasks /create /TN "My App" /TR xxx.exe /SC MINUTE /MO 2 /ST 04:45:00

This doesn't work at all:
SCHTASKS /CREATE /TN "My App" /TR cmd.exe /SC MINUTE /MO 2 /ST 04:45:00
/DU
0000:01


All help will be appreciated.

The duration parameter, as used in the GUI, specifies the number of hours in
the day during which a repetitive task should be launched. If you schedule a
task to run once every hour from 6 am onwards for 8 hours then the last task
will be launched at 2 pm. It does NOT specify how long each task should run.

I am unable to see the /DU switch in the Command Line interface. Where did
you get it from? Why do you actually need it - doesn't the task end by
itself? And why not use the GUI to schedule your tasks? It's much easier to
use than schtasks.exe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top