Trouble executing Python script with Windows Task Scheduler

Viewed 15

Having trouble with Windows Task Scheduler, and didn't find a solution browsing through other questions. We've got several Python Scripts running via Task Scheduler that are all running just fine, but there's one in particular that just won't run.

The "Run whether use is logged in or not" box is checked, as well as the "Run with highest privileges" box, as it is with the ones that are working.

In the Start Program box I have "C:\Program Files\Python310\python.exe" and in the Add Arguments box I have C:\Users\<user>\<dir1>\<dir2>\script.py.

Using cmd, the following runs the program and generates the file I want perfectly, which is just the exact same things as above.

"C:\Program Files\Python310\python.exe" C:\Users\<user>\<dir1>\<dir2>\script.py

I've tried changing the location of the python interpreter, using a different interpreter version, using task scheduler to run CMD first with the above as arguments, and nothing seems to do it.

On every attempt, I get the following:

Task Started            (1)
Action started          (1)
Action completed        (2)
Task completed          (2)

And every time this happens, the script hasn't actually run. I even copy/pasted my the bits in task scheduler into CMD to make sure I didn't overlook a typo or something like that.

Thanks in advance!

0 Answers
Related