If you've used Scheduled Tasks in Windows XP, you'll be pleased by the changes in Windows Vista. To begin with, the user interface to the task scheduler has been implemented as a Microsoft Management Console (MMC) snap-in, giving you access to more information about the properties, status, and run history of your tasks (and those that the operating system and your programs have established for you). For more information about MMC, see What is the Microsoft Management Console (MMC)?
Second, the Scheduled Tasks snap-in has been neatly integrated with the Event Viewer snap-in, making it easy for you to use events (for example, an application crash or a disk-full error) as triggers for tasks. For more information about the Event Viewer snap-in, see Open Event Viewer.
Third, and most important, Windows Vista Task Scheduler supports a much more extensive set of triggering and scheduling options. Now, in addition to running programs or scripts at specified times, you can start actions when the computer has been idle for a specified time period, when particular users log on or log off, and so on. You can use these (and other) triggers to send e-mail messages or to display a message window, as well as to run programs or scripts.
To start the Task Scheduler snap-in, click the Start button
, click Control Panel, and then click System and Maintenance. Under Administrative Tools, click Schedule tasks.
If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
If you have an Administrative Tools folder on your Start menu, you can find Task Scheduler there. Or, if you're handy at the keyboard, simply press Windows logo key+R, and then type taskschd.msc in the Run dialog box. However you issue the command, you'll need to answer a User Account Control (UAC) dialog box prompt before the Task Scheduler snap-in appears.
The following illustration shows Task Scheduler in its default layout. As you can see, the window is divided vertically into three panes—a console tree on the left, an Actions pane on the right, and various informative areas in the center pane. The console tree shows you which computer you're working with (the local computer or a network computer to which you have connected) and provides a folder tree of currently defined tasks. You can create your own folders here to organize the tasks that you create yourself, or you can add new tasks to existing folders.
The Actions pane provides a menu of things you can do. With rare (and probably unintended) exceptions, items here are also available on the menus at the top of the window, so if you're feeling cramped in the center pane, you might consider hiding the Actions pane. (To do this, click View, click Customize, and then clear the Action pane check box.)
Windows Vista Task Scheduler is implemented via a Microsoft Management Console (MMC) snap-in
In the center pane, initially, you'll see an Overview of Task Scheduler message (this is a static bit of text; once you've read it, you can hide it by clicking the collapse arrow at the right), a status report (in the Task Status area) of all tasks that have run (or were scheduled to run) during some period of time (by default, the most recent 24 hours), and a summary of all the currently enabled tasks (in the Active Tasks area). Entries in the Task Status list have outline controls; click an item's plus sign to see more details.
The Task Status and Active Tasks areas are not updated automatically. To get the latest information, click Refresh (at the bottom of the screen, in the Actions pane, or on the Action menu).
If this is your first visit to Task Scheduler, you might be surprised by the number of active tasks that Windows and your programs have already established. For example, if you use the Windows Vista backup program to perform regular, full, and incremental backups, you'll find some backup-related items in the Active Tasks list. Unless you or someone else has disabled automatic disk defragmentation, there will be an item in the list. If you rely on Windows Calendar or another program to remind you of appointments or task deadlines, chances are that functionality will be represented in the Active Tasks list.
To see what tasks managed by Task Scheduler are currently running, click Display All Running Tasks in the Actions pane. (If you're looking for this command on the Action menu, be sure that the top node in the console tree is selected.) Review the tasks, and then click Close.
To satisfy your curiosity about what an active task does and how it has been set up, you'll need to locate it in the console tree. Expand the console tree entries as needed, and then browse to an item of interest. The console tree entries are virtual folders, each of which can contain subfolders or one or more tasks.
When you select a folder in the console tree, the center pane in Task Scheduler splits into two panes. The upper pane lists all of the tasks stored in the selected folder. The lower pane, meanwhile, shows tabbed pages of the properties of the current task. The following illustration shows the WindowsBackup folder selected in the console tree, the AutomaticBackup task selected in the upper pane, and the General properties page for the AutomaticBackup task in the lower pane. (The Actions pane is hidden in this illustration.)
Selecting a folder in the console tree produces a list (in the upper pane) of the tasks in that folder and tabbed property pages (in the lower pane) for the selected task
The tabbed property pages that appear in the lower pane of the Task Scheduler snap-in (for example, see the previous illustration) are read-only. To edit the properties associated with a task, right-click the task name in the upper pane, and then click Properties. (Or, you can double-click the task name in the upper pane.) Either way, this opens a dialog box with read/write properties in a separate window.
With the exception of the History tab, the tabbed property pages in the lower pane are simply a read-only version of the Create Task dialog box, one of the tools you can use to create a new task. We'll explore that dialog box in some detail, later in this column. The History tab allows you to see exactly how, whether, and when a task has run. The following illustration shows the History tab for the AutomaticBackup task.
The History tab lets you confirm that a scheduled task is running as expected
When you click the History tab, the relevant part of the Event Viewer snap-in snaps in, showing you all of the recent events relating to the selected task. This is exactly what you would see if you ran Evntvwr.msc, navigated in the console tree to Applications and Services Logs\Microsoft\Windows\TaskScheduler\Operational, and then filtered the resulting event log to list events relating to the selected task.
Note
To run the Event Viewer snap-in (Evntvwr.msc), click the Start button
, and then type Event Viewer in the search box. Under Programs, double-click Event Viewer.
If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
Obviously, if you want this information, it’s quicker to find it in the Task Scheduler console than in the Event Viewer console. If a task you’ve set up is not getting triggered when you expect it to or is not running successfully when it should, you can double-click the appropriate event entry and read whatever details the event log has to offer.