0

I have created a scheduled task that runs every minute, indefinitely.

The task launches a batch which moves files between 2 servers. It runs with a specific domain account.

The task takes up to 10 seconds to finish.

When the task is scheduled for the first time, it works correctly for several hours. At some point it starts launching n instances of the same task and many of them fails as you can see below. After few hours the launched instances are 2 or 3, but then it reaches up to 9 instences.

problematic run

Then if I modify the task and save it (without modifying anything actually), it runs correctly for few days again.

correct run

Same task used to work correctly on Windows Server 2012 R2. I've troubles with Windows Server 2019 and 2022

1st fixing attempt

Modifying the task "for a duration of" and setting 1 day instead of indefinitely seems to have 99.9% solved the problem task "for a duration of"

Now the error occurs only when the run time coincides with the one defined in the trigger log overview

1 Answer 1

1

I've been having this same issue with a script I created for about a week and couldn't figure out why the hell this was happening until just now. Everywhere I look online gives vague answers and solutions like yours but never a real reason as to what's happening, but I think it has to do w/ setting up a task to run "indefinitely". For instance, my task was running daily starting at 2:00pm, repeat every 1 hour, indefinitely. Then I'd come to check on it in a day or two and find all these warnings about concurrent launch requests. What I just realized is that the Task Scheduler is restarting the whole process at 2pm everyday. Sure, it continues to run every hour, but it's beginning a new "task" to run concurrently with the already setup task.

So during the first day, everything runs smoothly. Starting at 2pm, every hour the task runs, and completes as it should. Then on day two, at 2pm, the original task continues to rerun every hour indefinitely, but since it's setup to start at 2pm every day, it creates a new task process to run as well. So now, I have 2 tasks running indefinitely, every hour. On day 3, same thing - 3 tasks run at 2pm, indefinitely, every hour. And so on... It has nothing to do w/ the script, it's just the literal definition of how task scheduler works. I don't have a work around tested yet, but hopefully that will give you an idea as to why this is happening.

1
  • Thanks for your answer. I think I've solved modifying the task "for a duration of" and setting 1 day instead of indefinitely. I only have one error per day, not 1440 :) Anyway your explanation seems to be very tight to what's happening
    – gipinani
    Commented May 2 at 15:30

You must log in to answer this question.

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