Disabled Windows Task and remapping issue

Hi there,

we’ve disabled windows tasks which should output an “OK” status, so configured this rule:

But it seems that if the task exited with an error code, this overwrites the “not enabled” flag? is that possible?
Here you see the Task is going critical, even it is not enabled.

Or is there maybe even a possibility to disable all services where the task is not enabled? (I Imagine that is not possible because of the value comes from the long output… ?)

Thanks in advance,
Constantin

The Windows task check is completely broken as it uses the “schtasks” shell tool and this tool is language dependent. What is a real pain.

If your output is correctly interpreted and formatted then the check itself will not create tasks that are disabled.

The problem is that the check expects exactly the string “Disabled” for such ignored tasks.
From the check
if v.get("Scheduled Task State") != "Disabled"]

I made a first proof of concept Windows plugin and check that is using the “Get-ScheduledTask” command from Powershell.
The states are numerical output and also on German Windows you get correct English states.

Example output line from my “windows_tasks.ps1”

<<<windows_tasks:sep(124)>>>
TaskName|LastRunTime|NextRunTime|LastTaskResult|State|NumberOfMissedRuns
S-1-5-21-2774354424-3904882488-1317813957-1001|30.11.1999 00:00:00||267011|Disabled|0
Firefox Default Browser Agent 308046B0AF4A39CB|26.10.2021 20:56:56|27.10.2021 11:04:04|0|Ready|0

There is no strange browsing function needed :smiley:

But such Bugfixes for broken plugins are hard to bring to the Munich guys.

1 Like

What a pity - thanks for your plugin - i’ll give it a try and let you know.
And +1 for the todolist @munich :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.