Share via


Scheduled Tasks MP - Updated version

There are some good task scheduler MPs out there, but this didn't prevent from updating this one :-) It's also a good way to practice MP development!

So here the latest version of this MP (v1.0.0.15), including some changes from Vincent at PI Services (thanks to him!):

 - The MP is now able to deal with tasks with parameters, for executables with the extensions .CMD, .BAT, .EXE, .VBS or .COM. Anything that comes after the extension is considered to be part of a parameter strings. The only exception is when CSCRIPT.EXE is the script host being used, where the MP checks if the script being called exists on the machine. When the task files cannot be found, the name of the file is being specified in the Health Explorer states change history. If needed for any remaining reasons, an override can also be set on the script parameters for this monitor, to put the accurate executable path and get accurate data from this monitor.

 -  Disabled tasks are not ignored during discovery (a new “disabled” attribute has also been created)

o A monitor (with alert) has been added to warn the Ops Mgr operator if SCHTASKS.EXE is not present/recognized by the system. This tool is important for the other scripts, so this monitor is a good way to prevent other issues with the script.

o The files TasksM.csv and TasksD.csv have been move to the temp folder of the machine, and are now being deleted at the end of each pass (if they exist).

Hope you'll enjoy the MP!

 

Sched Tasks.zip