Pages

Tuesday, January 31, 2017

Task Scheduler Scheduled task fails with: "Last Run Result (0x1)”

Problem

You’ve created a new scheduled task in Task Scheduler to execute a batch file but notice that the task does not complete successfully and the Last Run Result is (0x1):

image

Reviewing the History tab of the scheduled task shows the following log entries:

Level: Information

Task Category: Action completed

Operation Code: (2)

General:

Task Scheduler successfully completed task "\Microsoft\Daily Certificate Expiry Notification" , instance "{ae87616f-a564-4c34-ab21-0a7f7cc2a99c}" , action "C:\Windows\SYSTEM32\cmd.exe" with return code 2147942401.

image

Level: Information

Task Category: Task completed

Operation Code: (2)

General:

Task Scheduler successfully finished "{ae87616f-a564-4c34-ab21-0a7f7cc2a99c}" instance of the "\Microsoft\Daily Certificate Expiry Notification" task for user "NT AUTHORITY\NETWORK SERVICE".

image

Solution

One of the possible causes to this issue is if the Start in (optional): of the configured action is not filled out. To correct this, open the properties of the scheduled task, navigate to the Actions tab and then edit the action:

image

Notice that the Start in (optional): field is not filled in:

image

Fill in Start in (optional): with the path to the batch file:

image

With the above in place, the job should now run with the Last Run Result as The operation completed successfully. (0x0):

image

4 comments:

Unknown said...

Thank's guy !
It's perfect :)

Anonymous said...

+1

Gizmoxo said...

Thank's guy!

Anonymous said...

This is very helpful and help me fix problem. Thank you!