Answer the question
In order to leave comments, you need to log in
How to run python script in scheduler?
Hi everybody!
I have a simple script that parses an XLSX file and generates some CSVs using the openepyxl library. I made an EXE out of it using the pyinstaller library to run on a non-Python machine using the task scheduler.
Problem: if you run the exe-file or script manually, then everything works fine. If you run the same script or exe through the Windows scheduler, then the task does not work, and the result of the execution is 0xFF. The task runs under the service user, there are rights to run it. If you set the option "Run only when the user is logged into the system" in the scheduler settings, then everything works, if you set the launch option regardless of whether the user is logged in or not, then nothing works.
Has anyone experienced something similar? Apparently, the library requires interactivity from the session.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question