By Scott Davis on Apr 06, 2015
Windows Scheduler: Get Your Priorities Straight
This article will take 1 minute to read
Here at AGRC we have a variety of tasks (usually python scripts) that need to be run on a schedule. These are usually workflows that scrape and ETL data for web applications. Currently we use Windows Scheduler to run these scripts. Recently I've had problems with scripts taking way too long to complete. After a bit of digging I discovered that, by default, Windows Scheduler assigns a process priority of "Below Normal" to all tasks. The pain point is that they provide no UI to change this setting. After a bit of digging I found the following steps to work around this problem by hand editing the xml export of a task.
1. Right-click on the task and export it as an xml file.
2. Open the file in a text editor and search for the "Priority" element.
3. Change the value of the this element to the desired priority level. See this page for a list of possible values. Usually 6 is what you want.
4. Save your changes and close the xml file.
5. Delete the original task and re-import the modified xml file as a new task.