Task Scheduler for running python script done in PyCharm - Anaconda environment

Viewed 23

I have created several scripts in PyCharm, inside an Anaconda3 environment. The thing is that I would like to run them with the task scheduler during the night, so hopefully by the time I get up they have done their stuff.

I have read a million post in Microsoft support and in here, and I haven't found an answer for this issue.

This is a print of the set-up for the Task Scheduler:

enter image description here

For the program, I use the path to python.exe inside anaconda ( I take this path from cmd / where python).

Start in: the route to the script: C:\Users\oper\PycharmProjects\MyProject

It doesn't run, and it brings the error: 0x1. Opens a CommandPrompt windows and immediately closes it. I see the error in: Last Run Result. I have been able to run a much simpler code that prints a .txt in a specified folder - but not this one.

Additional info:

  1. this script runs a Selenium WebDriver and navigates some websites, connects with Google's OCR, etc. All these steps are written in several other modules for ease of coding.
  2. All the libraries used were installed using pip inside PyCharm's terminal. Might be related to not having the libraries in sync? Don't know how to check that.
  3. I would also like to set up a wake-up from sleep for the computer. Probably a different problem for another question.

Thanks in advance.

0 Answers
Related