Skip to content Skip to sidebar Skip to footer

How To Schedule A Python Script To Run From Virtual Environment Via Task Scheduler

I stumbled on an answer for basically the exact same question, but either I am implementing the solution wrong, the solution is no longer accurate, or some other issue is at play.

Solution 1:

Did you try putting the commands in a batch file and executing the batch file from task scheduler? Something like below:

C:\Users\I511843\myenv\activate.bat && python C:\Users\I511843\Desktop\Atom_scripts\test.py goes into task.bat file.

In task scheduler, run task.bat from cmd.

Post a Comment for "How To Schedule A Python Script To Run From Virtual Environment Via Task Scheduler"