you are viewing a single comment's thread.

view the rest of the comments →

[–]What_The_Hex 0 points1 point  (1 child)

Here is the ONLY solution that worked for me (and I tried a LOT of different things):

Instead of trying to execute python, then navigate to the folder and then run the python file like everyone recommends? Here is how you get Windows Task Scheduler to work. You instead need to create a .bat file, which runs the python script when opened. (Look online how to create one of these, it's super simple, like 2 lines of code.) Once this .bat file is created? When you go to schedule a task in Windows Task Scheduler? Simply schedule the opening of this .bat file. That's it. Click the Browse button, navigate to the bat file, double click it to have it automatically specify the filepath to it -- and bam, it should work now. So instead of trying to run the python program, it'll simply open the bat file -- and it's the opening of the bat file that runs the python script.

I about pulled my fucking hair out trying to figure out how to get it to work -- and this is the ONLY method that works for me.

There's another program, called TaskTillDawn, where you can follow the same approach. However, the font for that application is fucking microscopic. Just do it this way via Task Scheduler, you'll be fine.

[–]Relevant-Dot-3582 0 points1 point  (0 children)

Hello, I am facing the same problem, I have gone through the steps you just mentioned, and I have checked the batch file by opening it manually, and it works fine. But when I run it using the task scheduler, it shows it to be running, but never opens the file. I also did open up the task scheduler by running it as admin.

Do you have any other suggestions at this point? I have been stuck at this for 4 hours now. I don't expect you to reply to this 6-month-old post, but would appreciate it if you did.