1👍
Don’t know if you’re still looking for this but I found a working solution here – configure .bat file to run commands in Django Virtual Env
Very simple; point to the location of your project directory…
cd C:\webapps\my-project-dir-with-manage.py-inside
copy and paste the contents of the system generated activate.bat,found inside your venv/Scripts folder…
add your command line…
.\manage.py <your command here>
save as myfile.bat, and schedule via the Windows Task Scheduler.
Super simple.
0👍
I had the same problem.
The main issue is, that you missed the full path to python.exe
as an execution application. "Python" will not work.
And then your application as an argument.
Additionally, to that, you can add w to py. This will make it runnable on windows without a .bat
file.
Application to execute:
C:\user\python.exe Argument: manage.pyw runserver
Source:stackexchange.com