In the past we have repeatedly stated that jobs , which we keep on start Windows Task Scheduler , to run much slower than when we start the same jobs interactively. The difference can be 2-3 times as big. We have noticed this slowdown phenomenon in various robocopy jobs that run via the Windows Task Scheduler much more slowly than when we start them normally.
First of all, we assumed that it had to do with the Robocopy parameters or settings in the task planning. But this is not the case. The problem lies in the priority of how the task was created in the expenditure planning. You cannot change this priority setting via the GUI of the task planner, but with a little detour this works perfectly.
Export task via expense planner
First of all, you have to export the task that you have already created in the task planner and that runs too slowly.
This creates an XML file , which you can then easily view and edit with a notepad or other text editor. Below we have shown you an exemplary XML file of a task.
We have framed the crucial point in red for you. Here you can see the priority of how the task was created in the task planning. The priority defines the priority with which the task is executed in the background . Since Microsoft differentiates between a total of 11 priorities and the highest priority is ” 0 “, priority 7 is relatively slow. Here is a list of the individual priorities.
priority | Priority class | Priority level |
---|---|---|
0 | REALTIME_PRIORITY_CLASS | THREAD_PRIORITY_TIME_CRITICAL |
1 | HIGH_PRIORITY_CLASS | THREAD_PRIORITY_HIGHEST |
2nd | ABOVE_NORMAL_PRIORITY_CLASS | THREAD_PRIORITY_ABOVE_NORMAL |
3rd | ABOVE_NORMAL_PRIORITY_CLASS | THREAD_PRIORITY_ABOVE_NORMAL |
4th | NORMAL_PRIORITY_CLASS | THREAD_PRIORITY_NORMAL |
5 | NORMAL_PRIORITY_CLASS | THREAD_PRIORITY_NORMAL |
6 | NORMAL_PRIORITY_CLASS | THREAD_PRIORITY_NORMAL |
7 | BELOW_NORMAL_PRIORITY_CLASS | THREAD_PRIORITY_BELOW_NORMAL |
8th | BELOW_NORMAL_PRIORITY_CLASS | THREAD_PRIORITY_BELOW_NORMAL |
9 | IDLE_PRIORITY_CLASS | THREAD_PRIORITY_LOWEST |
10th | IDLE_PRIORITY_CLASS | THREAD_PRIORITY_IDLE |
“ Priority 7 ” means that it runs slower than a job that started normally. Programs that you start interactively are usually executed in priority 4 or 5 .
Customize the task’s XML file
So you have to change the ” priority ” of the task from ” 7 ” to ” 5 ” in the XML file and save the XML file in a temporary folder.
Replace task with new XML file
Then you delete in the task planning of the previous task and then simply import the changed XML file of the job.
Now the task is created in the task planner with priority 5 and therefore does not run as a classic background service but at the same speed as when you start it interactively.
You can find more interesting Windows tips here:
– Deactivate the automatic maintenance tasks in Windows 10
– Block or deactivate Task Manager and prevent calling
– Program icons in the taskbar disappeared in Windows 10 – Delete icon cache
– Remove contacts icon from Windows 10 taskbar
– Switch Windows 10 taskbar to small icons
– LastActiveClick – Always switch back to the last opened tab on the taskbar