Scheduled Task MP

This MP has been released by MVP Maarten Goet, Inovativ and it is worth looking at even if you do not think you are using scheduled tasks on your Windows servers. I installed it at one company as they had one server that did a number of scheduled tasks and they wanted that monitoring. What they found was a large number of tasks on a number of servers. Some of those had not been run for a while and some failed as the account used for the task had a different password now. So a bit of housekeeping was in order.

I am impressed as I have been looking at how to do MP discovery and it is a lot more complex than just picking up a registry key and creating a group as in 2005!

The MP uses schtasks.exe which means it will not run on Windows 2000. Although the document says it will run on XP, Vista, 2003 and 2008 it does not explicitly mention that it does not run on 2000. So if you have 2000 servers then be sure to exclude them from the discovery rule otherwise you will constantly get script errors. If you want it to run on Windows 2000 there are a few web sites that show that by using a hex editor to change one location it can be run with Windows 2000. Totally unsupported by Microsoft I would suspect. Here are 2 examples.

http://www.jsifaq.com/SF/Tips/Tip.aspx?id=5335

http://www.windowsitpro.com/article/articleid/25186/how-can-i-use-windows-xps-schtasksexe-tool-under-windows-2000.html

There is an object discovery and a monitor that fires off a script. Both run every 60 seconds with a 20 seconds timeout. This is a bit aggressive and I saw lot of script errors as it hit busy servers. These timings are great for demos but unless you really need to know quickly I suggest changing the monitors to run every 3600 seconds (1 hour) or longer for the discovery. If you need to know the state of the job use eventcreate.exe to create events at errors in the batch file run by the tasks and create rules to monitor those. I also created an override for the 20 second script timeout on the discovery rule but there was not an override option for the monitor.

clip_image002

There are two views created. The first is a general overview listed by server.

clip_image004

The second shows the list of tasks from all servers and although the server name is in the next column the task name comes up as the source so you may want to think about a standard naming convention across all the servers! Have a task just called Monday on 50 servers may not be a good thing!

clip_image006

You can also do Health Explorer to find the broken task.

clip_image008

This is a great little MP with the caveats of not doing Windows 2000 and the rules/monitors running too frequently. Most of this can be changed with overrides. Highly recommended.

Advertisements

Comments are closed.

%d bloggers like this: