How to Set Up a Windows Task Scheduler to Run a Python Script Every Hour?

Estimated read time 1 min read

You can set up a Windows Task Scheduler to run a Python script every hour by following these steps:

  1. Open Task Scheduler by pressing the Windows key and searching for “Task Scheduler”.
  2. Click on “Create Task” in the Actions panel on the right.
  3. Give the task a name and description.
  4. Under the “General” tab, select the “Run whether user is logged on or not” option and check the “Run with highest privileges” box.
  5. Under the “Triggers” tab, click “New” and select “On a schedule”. Set the schedule to “Hourly” and set the interval to “1”.
  6. Under the “Actions” tab, click “New” and select “Start a program”. In the “Program/script” field, enter the full path to your Python executable, followed by the full path to your Python script.

For example, if your Python executable is located at “C:\Python38\python.exe” and your script is located at “C:\scripts\myscript.py”, then you would enter:

C:\Python38\python.exe C:\scripts\myscript.py
  1. Click “OK” to save the task.

Your Python script will now run every hour as scheduled.

You May Also Like

More From Author

+ There are no comments

Add yours

Leave a Reply