I created a Python script that collects data from a website and generates an Excel file based on a table in that website. I used pyinstaller with -w -F parameters to generate a .exe file.
I ran this file a few times and it worked perfect so I decided to use Task Scheduler to run it every hour. Two days after the task worked every hour, while I was using the computer the Task Scheduler returned this error when it tried to run the .exe: 0xFFFFFFFF and a pop-up saying: Failed to "something"
Given the fact that I needed data every hour, I ran the file manually and again... it worked!
Is there any way I can fix this? How can I make sure that it won't fail again when I leave my computer online for 1 week but I'm not there to manually start it in case it fails...
Here are the settings for the Task Scheduler:
Actions: Program/script: C:\path1\path2\path3\Script_G1.exe / Start in (optional): C:\path1\path2\path3\
Settings: Allow task to be run on demand
We had a similar problem where we'd get a 0xFFFFFFFF error when running our custom .exe from Task Scheduler, but it would work fine outside of Task Scheduler.
The workaround was to create a .bat file to run the .exe and make the scheduled task call the .bat file. Not a solution, obviously, but works in a pinch.
User contributions licensed under CC BY-SA 3.0