Skip to content

Scheduling Scripts on Windows (Task Scheduler)

Task Scheduler runs your script in a different environment than your terminal.

Be explicit about:

  • Python executable path
  • script path
  • working directory
  • Use a .bat file that activates venv then runs the script
  • Log output to a file
text
@echo off
cd /d C:\path\to\project
C:\path\to\venv\Scripts\python.exe my_script.py --source C:\data

pch.coffeeTagline

pch.coffeeCta

pch.feedbackHeading

pch.feedbackSubheading