FG
💻 Software

How to make TaskScheduler fail when the task returns result different from 0

Fresh7 days ago
Mar 15, 202614916 views
Confidence Score0%
0%

Problem

I have a backup task that fails with a non zero result, yet Task Scheduler says that it executed the task correctly. Is there any way to tell Task Scheduler that the task failed?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to make TaskScheduler fail when the task returns result different from 0

Low Risk

It is possible to "restart" the task if it fails. Use following code in the batch script to create a system error event: eventcreate /ID 100 /SO "Your Script Name" /L APPLICATION /T ERROR /D "Your failure reason" Create a new task with a trigger tha…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment