Next Run Defined Monitor

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

Knowledge Base article:

Summary

Windows Scheduled Task Next Run Defined Monitor.

The monitor checks the next run time of a scheduled taks every minute.

'Never' is considered a warning condition for an enabled scheduled task.

Configuration

Use overrides to:

Causes

The task's schedule has expired

Resolutions

Reconfigure the Scheduled Task

Disable or delete the Scheduled Task

Element properties:

TargetCustom.Windows.ScheduledTask.Repetitive
Parent MonitorSystem.Health.ConfigurationState
CategoryAvailabilityHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeCustom.Windows.ScheduledTask.DiscoveryData.NextRun.MonitorType
RemotableFalse
AccessibilityPublic
Alert Message
Scheduled Task's schedule expired
The Scheduled Task '{0}' has a next run property of: {1}. The task will not run again until its schedule is updated.
RunAsDefault

Source Code:

<UnitMonitor ID="Custom.Windows.ScheduledTask.NextRun.Monitor" Accessibility="Public" Enabled="false" Target="Custom.Windows.ScheduledTask.Repetitive" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="false" Priority="Normal" TypeID="Custom.Windows.ScheduledTask.DiscoveryData.NextRun.MonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Custom.Windows.ScheduledTask.NextRun.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>$Target/Property[Type="SchTaskLib!Custom.Windows.TaskSchedulerTask"]/TaskNextRunTime$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="HasDate" MonitorTypeStateID="HasDate" HealthState="Success"/>
<OperationalState ID="Never" MonitorTypeStateID="Never" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>61</IntervalSeconds>
<BagValue>$Target/Property[Type="SchTaskLib!Custom.Windows.TaskSchedulerTask"]/TaskNextRunTime$</BagValue>
<TaskState>$Target/Property[Type="Custom.Windows.ScheduledTask"]/TaskState$</TaskState>
</Configuration>
</UnitMonitor>