Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the Settings tab of a Task in Task Scheduler Windows 2008 and Win8 you can specify additional settings that affect the behavior of your task.

The setting for "Stop the task if it runs longer than:" only allows as low as 1 hour but is there any other way to specify in minutes effectively terminating my job if it runs long than 15 minutes?


share|improve this question

enter image description hereYou can specify a duration in minutes from the command line using "schtasks /create". The /DU option allows for HH:mm So you should be able to set it for 15 minutes if needed.

share|improve this answer
That /DU option seems to be related to the duration of the repetition interval and not the termination. The different tests I created at the command line never changed the "Stop Task If Runs X Hours and X Mins" setting (schtasks /query /fo LIST /v /tn test). I tested with a simple test but was unsuccessful: schtasks /create /tn test /du 00:01 /k /tr "ping.exe -t" – Mouffette May 11 '12 at 6:23
According to "schtasks /create /?" the /DU option "Specifies the duration to run the task." – MikeAWood May 11 '12 at 20:36
I had a few options to your example to get it to accept it into the scheduler. But it does work and shows "2 Minutes as the duration". See the pic I added above. The command I used was [schtasks /create /tn test /du 00:02 /k /tr "ping -t" /SC once /ST 13:35 /RI 1] – MikeAWood May 11 '12 at 20:43
Also, it appears that the GUI will let you manuall type in "1 Minute" into the duration drop down. I noticed that after i posted the above. So you probably can more easily just change it from the GUI, but keep in mind the duration time needs to be shorter than the repetition inverval (even if only running once). – MikeAWood May 11 '12 at 20:45
Ah, that makes sense. The trick in the GUI for manually typing in the drop down text field of "1 Minute" does work as well in this case under the "Stop task if running longer than:" That is in the "Edit Trigger" window just below the "Repeat task every:" option. – MikeAWood May 14 '12 at 18:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.