How to fix (0x1) error in task scheduler that runs a python script?

Marx, Jihee 0 Reputation points
2023-08-28T02:50:57.2366667+00:00

My work team set up a task scheduler that runs a python script that creates an excel file and sends a survey once a day. But it was running under a specific teammate, but when this person left the work, I had to recreate a task scheduler with my credential... Before this person left, we tested together, and the task scheduler was working for few days under my credential... Everything was exactly same and only change the user, so it worked...

Then few days ago, it suddenly has a problem... task scheduler runs but doesn't create an excel file nor send a survey... When I run the python script manually, it runs. So it confirms that there is no issue in python script. (plus, again no change made in the script and it used to work!)

I think it is an issue in the task scheduler, but because it used to work, and I did not change anything... I am not sure what is the problem...

Current setup is like...

  • Run whether user is logged on or not
  • Run with highest privileges
  • Under Action:
    • Program/script: C:\Python\Python39\python.exe
      • Add arguments (optional): test.py
        • Start in (optional): D:\testfolder

When it was running correctly, I have a message from "Last Run Result" column saying "The operation completed successfully. (0x0)".

But now it shows "(0x1)"...

I did many research on 0x1 error in google, but the solutions are nothing different from my current setup... what should I do more to fix this problem?

Windows for business | Windows Server | User experience | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.