cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Creating an Alert from a Windows Scheduled Task Running too long

Jump to solution

I have added the Windows Scheduled task monitor to a node (in this case nodeID 391 as seen below. And I need to alert when tasks fail, but also when a specific task runs too long.

If I run the SWQL after that task has been running over 30 minutes it does return the correct result. I am not sure how to convert it into an alert when this condition is met.

SELECT ComponentID, NodeID, Name

FROM Orion.APM.Wstm.Task

Where Name = 'Task Name' and NodeID = '391' and State = '4' and MINUTEDIFF(ToLocal(LastRunTime), GETDATE()) > '30'

Thanks for any suggestions

Tags (3)
0 Kudos
1 Solution
Product Manager
Product Manager

Have you considered simplifying the alert to simply not trigger unless the task has been in a "Running" state for longer than 30min?

Long Running Scheduled Task.png

View solution in original post

2 Replies
Product Manager
Product Manager

Have you considered simplifying the alert to simply not trigger unless the task has been in a "Running" state for longer than 30min?

Long Running Scheduled Task.png

View solution in original post

I had not, I was clearly doing it the hard way. Thank you

0 Kudos