2

does windows server 2003 r2 allow the overlapping of scheduled tasks?

say i scheduled a script to be called every 5 minutes but there would be an instance that it might take 10 minutes.

when a tasks starts and then does not finish when the next call should happen, what is the behaviour of windows server 2003 r2?

does it let the same task run again? does it now allow it to run again because it is not yet finished?

1 Answer 1

7

The Task Scheduler in Windows Server 2003 will not start a task again if the task is still running from a previous invocation by default. You can tick the "If the task is still running, stop it at this time" box in the "Advanced Scheduled Properties" in the "Repeat task" frame which will cause the Task Scheduler to end the prior invocation before starting a new invocation when a task is still running at the next scheduled start time.

Typically the inability for tasks to be started "overlapping" prior invocations is a desirable behavior. If you absolutely do need tasks to overlap then your task will need to invoke a child process (which you could easily do by invoking your task with a %SystemRoot%\System32\cmd /c start your-task.exe command-line for the task). Child processes of the cmd.exe process (which would be the "task") will persist even after the task process ends.

1
  • 1
    Glad I could help. I dropped on an edit after you accepted elaborating on how you can create overlapping tasks if you really need them. Most people don't but somebody might come in here looking for that, too. Jul 12, 2013 at 6:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .