Forum Discussion

Vitor_Santos's avatar
4 years ago

Windows Scheduled Task(s) monitoring

Hello folks,

We had a request from a client where he had the need to monitor some important scheduled task(s).
While checking the documentation, we wanted to avoid the procedure on the actual 'Job Monitor' for scheduled tasks (since the clients is kind of harsh when it comes to make changes in their boxes, even if those represent no harm).

Since we were only interested in the actual task return code (after its run), we've done a quick DS (powershell).
Just sharing it here in case it's useful for anyone.

GitHub repo -> Here

For now, we're alarming on the actual task return code != 0. Since MS advises that anything differing from that represents some sort of issue. However, if you've any ideas/improvements just let me know :)/emoticons/smile@2x.png 2x" title=":)" width="20" />

Thank you!

6 Replies

  • The  Github post is not valid now . Please let me know if this still available anywhere

     

  • Updated the actual code since the task ExitCode was being output as Decimal & it's easier to present it as HEX on the actual alarm message.
    To accomplish that, I've added a function that makes use of LM API & maps a custom property at the instance level (this way we can then reference it in the actual alarm message -> converted to HEX).

    Hope it's useful for anyone

  • I have updated the actual DS.. Realized that it wasn't getting data from the actual endpoint in context.
    I was running PS commands locally (so it was always retrieving data from the Collector :( ).

    I've re-wrote it in order to use 'Invoke-Command' & this way it seems to be getting data for each device in context.

    Updated the GitHub repo

  • I am having issues when I try to use your Data Collection script for this.  The discovery works fine.  When doing the data collection, it times out with no results.  I do have my company defined in the URI.  Can you please point me in the right direction?

  • It seems that github repo is no longer valid? I am looking for a way to monitor windows scheduled tasks. Let me know if this is still out there somewhere and thanks for posting!

  • @Vitor Santos  Github post is not valid , could you please share the script here ?