The task completed with an exit code of (1)

In the Installer of one of my applications, I created a a batch file with an AT command to add a task to the Windows Task Scheduler. It all installed fine, but the scheduled task never ran. The error message the task log gave was:

The task completed with an exit code of (1)

After a little bit of frustration, I managed to find the error code definitions for the task scheduler. From the page:

0x0: The operation completed successfully.
0x1: An incorrect function was called or an unknown function was called.
0xa: The environment is incorrect.

To uncover the root of the problem I just ran the command in the task directly in DOS. Problem solved.

Leave a Comment

Your Comment