On my personal computer, I created a bat file with a command to run a py script inside. It runs fine in the command line and runs fine in Task Scheduler when "run when user is logged in" is checked. However I need to run the task when the PC is asleep or not logged in. When I select "run when whether user is logged in or not", I get the 0x1 error.
I have tried toggling run with highest privileges but no avail. I am not sure what the issue is since the script runs now in a variety of environment (command line, python, pycharm).
Currently Task Scheduler's only field populated is script which is the address to my bat file \users\desktop\batfile.bat The file's properties give read,write permissions to the appropriate users. I have searched on stackoverflow but the prescribed solutions have not worked for me. The py script modifies an excel spreadsheet if that is relevant.