Repair Task Scheduler on Server 2019
I have been fighting task scheduler for a while and have determined that there is most definitely an issue with task scheduler
we have a batch file that calls an executable.
We can run that batch file from the file explorer and we can watch with a ui and see all the different actions being taken, typically about 120 lines of actions. and this typically takes about a minute and a half to run.
When we put that same batch file in task scheduler and run it on maybe a reocurrance of every 10 minutes, task scheduler starts the task, the task completes 20 actions prior to prematurely ending the task at 5 minutes with no error log, no logs in even viewer, no errors in history, no nothing, but we can clearly see that for one reason or another task scheduler slows down the batch files execution from like 120 actions in a minute and a half to 20 actions in 5 minutes. and then doesn't even complete the task before ending.
This is a horrendous problem, imagine a backup job... and it slows the backup then kills it after 5 min. That would be very detrimental.
we also decided that since it's a batch file calling an executable that we can simply just call the executable instead, so we did... with the exact same result. Running the executable from file explorer ran all 120 actions in about a minute and a half, running it from task scheduler ran about 20 actions in 5 minutes and died at 5 minutes saying the task was complete even though it was not complete.
This absolutely needs to be fixed.
Scott W. commented
Server 2008R2 seems to be the last functional version of Task Scheduler. SInce it is going end-of-life, this is a critical fix for Server 2019