Mr. Roboto

Stay on Schedule

Need to keep track of all your network's scheduled tasks? Here's just the tool to do it.

One of the most incredible things -- or one of the scariest, depending on your point of view -- is that there's always something happening on your network. Even in the middle of the night, while you're dreaming of 64-bit servers and four-way clusters, your servers are quietly churning away doing something. The question is: Do you know what's going on?

If your network is like most that I've seen, you've set up some scheduled tasks on a number of servers over the years, but never really got around to documenting what they do or when they run. You may even have applications that set up scheduled tasks and don't tell you about it.

I've put together an HTML application (HTA) that will generate a report of all scheduled tasks running on your servers and/or desktops. Mr. Roboto's Scheduled Task Reporter serves as a GUI front-end for the Schtasks.exe command-line utility that ships with Windows XP and Windows 2003.

As such, you'll have to run it from an XP desktop or Windows 2003 server. Microsoft has indeed improved scheduled task support in Vista, but unfortunately this tool won't detect scheduled tasks on a Vista desktop. You might be able to scan your servers from a Vista desktop, but you shouldn't count on it. Keep your eyes out for something similar for Vista in the future.

For now, you're probably most interested in what your servers are doing and when they're doing it. The Scheduled Task Reporter should work fine for that task. After you copy all the files to a directory, launch the HTA file. You'll have to run this tool with administrator credentials. You can specify alternate credentials for any managed systems you're polling for task data, but not for the system on which you're running the tool.

To run Scheduled Task Reporter, simply select "computername," "text file" or "Active Directory" from the drop-down box. Selecting "computername" defaults you to the local computer, but you can type in any computer name you want. All you need is the NETBios name. You can also enter several computer names separated by commas.

If you choose the text file option, you can use a text file that contains a columnar list of computer names that might look like this:

Server01
Server02
Desk03

If the file isn't in the same directory as the HTA, enter the full filename and path. I've included an option to search Active Directory for computer accounts. If your computer belongs to a domain, the root distinguished name will be pre-populated. All you have to do is add the organizational unit path.

If you're going to query AD, then you should do so with caution. If you have a lot of obsolete computer accounts or systems that aren't available, you'll get incomplete results and it will take a long time to generate the report. I strongly recommend that you use the Ping option to verify that any computer is up and running before you try to poll it for any scheduled task information.

Roboto on Demand

You can download Mr. Roboto's Scheduled Task Reporter at: www.jdhitsolutions.com/scripts

What Windows admin task would you like Mr. Roboto to automate next? Send your suggestions to [email protected].

Once you have your source, click "Report" and the tool will check each computer for scheduled tasks. If all goes well, you should get an entry for each scheduled task that shows the task name, command, its schedule, credentials, last run and next run times.

You can hover your mouse pointer over the last run entry in order to see the last result. If your task has an attached comment, it will show it if you hover your mouse over the task description. It will also report any errors and any systems with no assigned tasks. Finally, use the Print button and file the report away with your network documentation. I also like to print a copy to PDF for fast digital retrieval.

Now there's no reason for you to not know what your servers are doing in the middle of the night, and you'll sleep much better. Pleasant dreams.

About the Author

Jeffery Hicks is an IT veteran with over 25 years of experience, much of it spent as an IT infrastructure consultant specializing in Microsoft server technologies with an emphasis in automation and efficiency. He is a multi-year recipient of the Microsoft MVP Award in Windows PowerShell. He works today as an independent author, trainer and consultant. Jeff has written for numerous online sites and print publications, is a contributing editor at Petri.com, and a frequent speaker at technology conferences and user groups.

Featured

comments powered by Disqus

Subscribe on YouTube

Upcoming Training Events

0 AM
Live! 360 Orlando
November 17-22, 2024
TechMentor @ Microsoft HQ
August 11-15, 2025