Reputation: 123
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
Upvotes: 5
Views: 14239
Reputation: 53
In the "Action" check the "Start in (optional)" field. It makes a difference in these situations.
Upvotes: 1
Reputation: 506
We had a similar problem. The program accessed shared disk F:\SomeFolder\File.log
and copied a file from it to the local folder. I had to change the shared disk path name in the program to use full server path.
From
F:\SomeFolder\File.log
to
\\serverName\\docs\\SomeFolder\File.log
and then it worked.
Upvotes: 1
Reputation: 2323
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.
Upvotes: 1