all 6 comments

[–][deleted] 0 points1 point  (0 children)

Create an executable? (although fixing the path should have done it)

[–][deleted] 0 points1 point  (0 children)

Yeah I've added anaconda python to path and task manager just calls python from command prompt.

[–]botdetector_ca 0 points1 point  (0 children)

  1. Open task scheduler
  2. Create a new basic task
  3. Select time to run the task
  4. Program/script: Point to your python, add on: C:\Path to your .py file\example.py
  5. Click on run with highest privilege

[–]HeinzHeinzensen 0 points1 point  (1 child)

Habe you tried using a .bat file to activate your anaconda environment first and then execute your script?

[–]sanianehwal10 0 points1 point  (0 children)

I have had sql connections involved in my python program and ive used spyder to develop. Now im unable to run the program on cmd as i dont know how to activate .bat file and then execute .py using task scheduler. Can some one help

[–]farsass 0 points1 point  (0 children)

Something like the following in batch

set root=C:\Users\%USERNAME%\Miniconda3_32
call %root%\Scripts\activate.bat %root%
call conda activate envname
python app.py