I've been struggling with this issue for months now. Whenever my computer is turned on for 2-3 days straight, Windows Task Scheduler service starts to slowly eat up all of my 32 GB of RAM, and after exhausting those it eats up all 32 GB of the swap file memory as well. I only knew it was some service at one of the svchost.exe instances, but today I nailed it down to Task Scheduler when I was able to stop it with Process Explorer and everything went back to normal.
My question is: what exactly can cause Task Scheduler to do this? It's certainly NOT one of the programs that are scheduled because it doesn't stop to consume all memory when I close every single program and service except Task Scheduler itself.
An important note: when it does that and I open the Task Scheduler in mmc, there are always some tasks showing an error (Microsoft Antimalware and a couple of others). Those errors can be fixed by removing those tasks both from Windows registry and from %windir%\Tasks and then re-importing them with <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
lines removed. However, after some time those lines magically appear in the tasks again and they throw errors again.
P.S. I don't know if the fact that those lines get re-added is the cause of the memory leak. P.P.S. there are no tasks that I don't need. I only have Windows tasks and some third-party software tasks, which never caused this behavior previously.
ps | get-object name, starttime
with the task schedules.get-object is not recognized as the name of a cmdlet
.ps | select name, starttime
if you doselect *
you can see the full list of properties to select. Sorry about theget-object
I was working on some project and got confused