I created an exe with auto-py-to-exe (onefile).
the exe works fine, but when I want to run this automatically in windows task manager the exe does start, but throw out an error on the location of my file.
data.json
data.json file is in the same folder as my exe file (I do not use a relative path )
Path
So i wanted to solve this by setting in the windows task scheduler 'start in (optional)' and the path of my folder
Start in then my problem with the path to data.json is solved, but my script crashes at the outlook api to read the mails.
If I run the program manually everything works fine.
Has anyone had the same experience and found a solution?
Make sure you entered a location of where your scipt should be ran in Start in optional text box.
Enter Action Properties -> Actions -> Select your action and click Edit -> Fill your Start in (optional) box with the location of where your script should be started.
This solved my problem that the script couldn't find some of libraries so each time it was ran from task scheduler it crashed. When I started it manually from Explorer then the script was working fine.
After filling in Start in option it works properly.