Setting a scheduled task process priority

I have been testing some long-running processes running over night, initiated from the Windows Server 2008 Task Scheduler. To my chagrin, they were still running when I checked them in the morning. I found out the default task priority for processes initiated from a scheduled task is “below normal”. To make matters worse for me, there is no way to override this from the Task Scheduler GUI. I have not confirmed it, but suspect this may all have been true in earlier Windows Server versions as well.

As usual, there is a way around this, but this time we don’t even have to alter the registry (no really!). In the Task Scheduler, right-click the task and select Export… and save the exported task in a file, then open that in a text editor (like Notepad). This is the XML that defines the task. Each action will have a <Task> section, which contains <Settings>, which contains a <Priority> element. The default value, for “below normal”, is 7. You can use either 6, 5, or 4 for “normal” priority. You will not usually want to go above “normal”. See for more information on priorities. Quick answer: 6 will probably work for you.

Update the value to what you want for the priority and save the modified XML. Go back to the Task Scheduler Library and choose Action > Import Task… from the menu. Feed it your modified XML file and it will open the Create Task dialog, using the name of your XML file as the default task name. Note that you cannot have duplicate task names. There is no ‘task name’ element in the XML; you can only name it when you import it. If you want to replace an existing task, you will either have to delete the existing task before the import, or give the import a new name then delete the old task and rename the new task with the old name.

This entry was posted in Microsoft Windows, Windows Server 2008. Bookmark the permalink.

26 Responses to Setting a scheduled task process priority

  1. Stewart says:

    Great tip! I just have one question… did increasing the priority get your jobs done in a more timely fashion?

  2. bdbits says:

    The jury is still out. I discovered this only this morning when viewing the below-normal priority via Task Manager. I wanted to see why it was below-normal and that led to what I posted. When I bumped it up to normal in Task Manager, I did immediately see it consuming more resources, but it could be co-incidence I suppose. I should be able to tell over the next couple of nights as this runs for several hours every night. This is on a test box as I don’t have this level of access to production. If it appears to have an effect, I will have this changed over there. My window to run the job is pretty tight and it would be nice to shave some runtime off.

  3. bdbits says:

    This looks very promising. Last night cut a couple of hours off the run time. I will continue monitoring for a few nights in case last night was some kind of a fluke.

  4. Spol says:

    Thanks for sharing this; had a hard time finding the solution for changing priority of scheduled tasks. Why o why is there not such a simple option for a task in Task Scheduler? *sigh* microsoft :-\

    I’d used your solution for fixing the slow response of a taskbar (not the superbar of windows, but Sony’s Vaio Gate v2.2) when a lot of CPU-intensive program(s) were running.


  5. Tim Crall says:

    Thanks!! This tip totally worked for me. My robocopies had been taking 4 times longer to run via Task Scheduler, but now they are right back to where they were when manually launched. Odd that a setting which the GUI is able to export and import cannot be modified from within the GUI itself – hopefully they will fix that in a future version.

  6. Matt says:

    Great tip! I actually wanted to lower my priority (I went to 9 which is below normal but not idle). I had been trying to get “start /low /b” solutions to work, but for some reason task scheduler had a problem with that and although it looked ok, it didn’t run my script.

  7. Jared says:

    Thank you, that worked like a charm – I have automated backups that I don’t need hogging all my resources while I’m using the computer and this allowed me to set it to the lowest priority. Appreciate the tip.

  8. prateek says:

    Been looking for it for a long time…
    simple consice comoplete

  9. daniel says:

    Excellent! I had a spamassassin process which was sometimes failing to respond to the email server in time, and this helped.

  10. Arvy says:

    Thank you, good tip. I have a process that is more important than all others, including Windows components, and now I set it to high. Again, thank you.

  11. JayP says:

    This fixed my problem also. Thank you very much! An interesting note is that as far as WIndows 7 goes, this is only a problem with the 64 bit version. I had a task that ran fine on a 32 bit version of Win7 but acted as described on the 64 bit version.

  12. Doug says:

    Thanks, bdbits. I’ve been wrestling with this for a few days and yours is the first truly relevant post I found. Got the priority changed, problem solved.

  13. Good tip! I used this to boost up the itype tasks, and now my volume control is more responsive under heavy system load.

  14. Way cool! Some very valid points! I appreciate you writing this post and the
    rest of the website is very good.

  15. repel says:

    Fabulous information with thanks :)

  16. MtheK says:

    This fix worked great! My WTS task was SEVERLY dragged down by 2
    normal nearly-consecutive I/O-intensive tasks. Process Explorer
    showed the WTS tasks’ I/O PRIority was LOW, while the others were
    NORMAL. In my case, the WTS task usually runs for about 30 seconds
    after boot, then 3 seconds when cached, but it actually ran 17 and
    30 MINUTES (that’s 600-fold!), doing the same amount of I/O it
    usually does! A snap dump showed it in FindNextFile, but running
    (count was 29892 of 76362 (39%) on file \CM\QCD3\TEMPDIRT.txt).

    After I changed the PRI from 7 to 6 as you stated, it’s now back to
    “normal”. It ran 84 seconds B 4 cached, 56 seconds after, probably
    longer due to the interference, but WAY BETTER(!) than when its’ PRI
    was LOW (the DEFAULT!?).

    Thankx much!

  17. Ideal. I was using UACpass to launch video capture software (Pinnacle Studio) via Task Scheduler without the UAC warning, now this allowed me to set to a high priority too so it captures with no dropped frames.

  18. Firoz says:

    Brilliant, thanks.
    Only problem now is JBoss (which was taking forever to load) now loads before the SQL services are loaded ! (Not a problem if SQL Server is on another server)

  19. nescafe2002 says:

    You can also use PowerShell to priority to ‘Normal’:
    PS C:\> $STSet = New-ScheduledTaskSettingsSet -Priority 5
    PS C:\> Set-ScheduledTask -TaskName “My Task” -Settings $STSet

    Use priority 3 for “Above Normal (10)”

  20. js2010 says:

    I figured out that the Windows 10 Application Experience/ProgramDataUpdater task runs at normal priority, which I find pretty obnoxious. Just google for “rundll32 invagent,dll”.

  21. js2010 says:

    # check priorities, above 7 is normal (4-6) or high (0-3)

    $result = get-scheduledtask

    foreach ($i in $result ) {
    if ($i.settings.priority -ne 7) {
    write-output $i $i.settings.priority

    # TaskPath TaskName State Priority
    # ——– ——– —– ——–
    # \Microsoft\Windows\Shell\ FamilySafetyMonitor Ready 1
    # \Microsoft\Windows\Application Experience\ StartupAppTask Ready 4
    # \Microsoft\Windows\Work Folders\ Work Folders Maintenance Work Ready 5
    # \ GoogleUpdateTaskMachineCore Disabled 5
    # \ GoogleUpdateTaskMachineUA Disabled 5
    # \ MATLAB R2016a Startup Accelerator Ready 5
    # \Microsoft\Windows\Data Integrity Scan\ Data Integrity Scan for Crash … Ready 5
    # \Microsoft\Windows\Registry\ RegIdleBackup Ready 5
    # \Microsoft\Windows\Plug and Play\ Device Install Group Policy Ready 6
    # \Microsoft\Windows\Plug and Play\ Device Install Reboot Required Ready 6
    # \Microsoft\Windows\SettingSync\ NetworkStateChangeTask Ready 6
    # \Microsoft\Windows\Sysmain\ HybridDriveCachePrepopulate Disabled 6
    # \Microsoft\Windows\Sysmain\ HybridDriveCacheRebalance Disabled 6
    # \Microsoft\Windows\Sysmain\ ResPriStaticDbSync Ready 6
    # \Microsoft\Windows\Sysmain\ WsSwapAssessmentTask Ready 6
    # \Microsoft\Windows\Task Manager\ Interactive Ready 5
    # \Microsoft\Windows\WCM\ WiFiTask Ready 6
    # \Microsoft\Windows\WDI\ ResolutionHost Ready 10
    # \Microsoft\Windows\AppID\ VerifiedPublisherCertStoreCheck Disabled 10

  22. js2010 says:

    If you just wanted to change the priority of a pre-existing task in powershell without putting other settings to their defaults:

    $result = Get-ScheduledTask -taskname programdataupdater
    $result.settings.priority = 7
    set-scheduledtask -taskpath “\Microsoft\Windows\Application Experience” -taskname ProgramDataUpdater -settings $result.settings

  23. Sam says:

    Thank you, this is was very helpful when I was wandering why my start-job PS commands were running faster in interactive mode. The one thing to add is that you can change the priority of the task from the task manager while the process is running by right clicking the process and changing the priority that way. Thanks again!

  24. Amit says:

    Yes. It perfectly worked for my win10 scheduled tasks. I saw huge performance improvement in execution after setting priority to 4.

  25. chris cox says:

    This definitely works and has helped our manual backup processes actually use the CPU. Thanks for this!

  26. Thank you your the best says:

    Niiiiice thank you so much it works perfectly ! I wanted to set Speedfan to priority 3 because it’s more important than every others tasks and my fans were so laggy to act… Prio wasn’t working now it’s perfect thank you !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s