Next scheduled execution skipped

Custom.Windows.ScheduledTask.OverRun.Monitor (UnitMonitor)

Knowledge Base article:

Summary

Next scheduled execution skipped Monitor.

The monitor checks if a scheduled task's execution was skipped because it was still running at the time it should have been started.

Configuration

Use overrides to:

Causes

The scheduled task is taking longer to complete than expected.

Resolutions

Reconfigure the scheduled task's schedule to accomodate for its execution duration.

Consider altering the task so that it terminates faster.

Element properties:

TargetCustom.Windows.ScheduledTask.Repetitive
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeCustom.Windows.ScheduledTask.OverRun.MonitorType
RemotableFalse
AccessibilityPublic
Alert Message
Scheduled Task ran past next scheduled execution
The Scheduled Task {0}'s next execution was skipped because it ran past the next scheduled run. The task started at {1} and has been running for at least {2} minutes. It is scheduled to run {3}.
RunAsDefault

Source Code:

<UnitMonitor ID="Custom.Windows.ScheduledTask.OverRun.Monitor" Accessibility="Public" Enabled="false" Target="Custom.Windows.ScheduledTask.Repetitive" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="false" Priority="Normal" TypeID="Custom.Windows.ScheduledTask.OverRun.MonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Custom.Windows.ScheduledTask.OverRun.Monitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SchTaskLib!Custom.Windows.TaskSchedulerTask"]/TaskName$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='SchTask:$Target/Property[Type="SchTaskLib!Custom.Windows.TaskSchedulerTask"]/TaskName$:LastRun']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='SchTask:$Target/Property[Type="SchTaskLib!Custom.Windows.TaskSchedulerTask"]/TaskName$:Duration']$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="Custom.Windows.ScheduledTask"]/TaskSchedule$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="EndedInTime" MonitorTypeStateID="EndedInTime" HealthState="Success"/>
<OperationalState ID="RanPastNextRun" MonitorTypeStateID="RanPastNextRun" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>68</IntervalSeconds>
<TargetComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</TargetComputerName>
<TimeoutSeconds>59</TimeoutSeconds>
<TaskName>$Target/Property[Type="SchTaskLib!Custom.Windows.TaskSchedulerTask"]/TaskName$</TaskName>
<TaskState>$Target/Property[Type="Custom.Windows.ScheduledTask"]/TaskState$</TaskState>
</Configuration>
</UnitMonitor>