Task Scheduler returns 0xFFFFFFFF in Windows 7

4

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

python
windows
task
pyinstaller
scheduler

3 Answers

1

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.

answered on Stack Overflow Oct 18, 2019 by Tawab Wakil
0

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.

answered on Stack Overflow Feb 24, 2020 by frogec • edited Mar 6, 2020 by marc_s
0

In the "Action" check the "Start in (optional)" field. It makes a difference in these situations.

answered on Stack Overflow Nov 20, 2020 by José Oliveira

User contributions licensed under CC BY-SA 3.0