Schtasks.exe and Windows XP Service Pack 3

  • Thread starter Thread starter Oni
  • Start date Start date
O

Oni

Guest
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.
--
Regards
Oni
 
Re: Schtasks.exe and Windows XP Service Pack 3


"Oni" <Oni@discussions.microsoft.com> wrote in message
news:ABA49811-1E2E-4E66-845B-912338654F2C@microsoft.com...
>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.
> --
> Regards
> Oni


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.
 
Re: Schtasks.exe and Windows XP Service Pack 3

Thanks for your swift reply Pegasus.

I found more info on this subject, check out this link from msdn.
http://msdn.microsoft.com/en-us/library/bb736357(VS.85).aspx

According to this link these options are not available on WinXP Pro, but in
other articles they claim to have this working on earlier versions. Have you
heard about this.
--
Regards
Oni


"Pegasus (MVP)" wrote:

>
> "Oni" <Oni@discussions.microsoft.com> wrote in message
> news:ABA49811-1E2E-4E66-845B-912338654F2C@microsoft.com...
> >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.
> > --
> > Regards
> > Oni

>
> 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.
>
>
>
 
Re: Schtasks.exe and Windows XP Service Pack 3

"Oni" <Oni@discussions.microsoft.com> wrote in message
news:74F42DC8-D65D-46DF-B413-A32C67741AEF@microsoft.com...
> Thanks for your swift reply Pegasus.
>
> I found more info on this subject, check out this link from msdn.
> http://msdn.microsoft.com/en-us/library/bb736357(VS.85).aspx
>
> According to this link these options are not available on WinXP Pro, but
> in
> other articles they claim to have this working on earlier versions. Have
> you
> heard about this.
> --
> Regards
> Oni
>


Sorry, I'm not aware of this.
 
Back
Top