Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows 7

Using the Windows 7 Task Scheduler (part 1)

3/18/2011 5:59:06 PM
The Windows 7 Task Scheduler, which requires no programming expertise, is probably the most important automation tool at your disposal. You can use it to set up automated routines, to be triggered by events or by a schedule. In addition to running programs or scripts at specified times, you can launch actions when the computer has been idle for a specified time period, when particular users log on or off, and so on. You can use these (and other) triggers to send e-mail messages or display message windows, as well as to run programs or scripts. The Scheduled Tasks snap-in has been neatly integrated with the Event Viewer snap-in, making it easy for you to use events (an application crash or a disk-full error, for example) as triggers for tasks.

Task Scheduler is implemented as an MMC snap-in; to run it, you can go to Control Panel, click System And Security, and then click Schedule Tasks, which you'll find under Administrative Tools, at the bottom of the window. If you have an Administrative Tools folder on your Start menu, you can find Task Scheduler there. Or, more simply, type task in the Start menu search box; Task Scheduler will appear at or near the top of the search results.

As Figure 1 shows, Task Scheduler in its default layout is divided vertically into three regions—a console tree on the left, an action pane on the right, and in between, various informative windows in the details pane. The console tree shows you which computer you're working with (the local machine 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 action pane provides a menu of things you can do. With rare exceptions, items here are also available on the menus at the top of the window, so if you're feeling cramped in the center, you might consider hiding the action pane.

In the center part of the window, initially, you'll see an overview message (you can hide this static bit of text, as we have done in Figure 1, by clicking the collapse arrow at the right), a status report 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.

Figure 1. The Active Tasks section of the details pane shows what tasks are currently enabled and when they will next run.


The Task Status and Active Tasks displays are not updated automatically. To get the latest information, click Refresh—at the bottom of the screen, in the action 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 applications have already established. For example, if you use the Windows 7 Backup program to perform regular full and incremental backups, you'll find some Backup-related items in the list. Unless you or someone else has disabled automatic disk defragmentation, there will be an item for it in the list. If you use a calendar 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 action pane.

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 outline entries as needed and browse to an item of interest. The entries in the console tree are virtual folders, each of which can contain subfolders of one or more tasks. When you select a folder, the upper part of the details pane lists all tasks stored in the folder. The lower pane, meanwhile, shows a tabbed display of the properties of the selected task. Figure 2 shows the RAC folder selected in the console tree, the RacTask task selected in the upper pane, and the General tab of the RacTask properties display in the lower pane. (This task generates system reliability data.)

Figure 2. Selecting a folder in the console tree produces a list of that folder's tasks in the upper part of the details pane and a properties display in the lower part.


The properties display that appears in the Task Scheduler details pane is read-only. To edit the properties associated with a task, right-click the task name and choose Properties from the shortcut menu. (Or double-click the task's entry.) That will open a read-write dialog box in a separate window.

With the exception of the History tab, the properties dialog box is identical to the Create Task dialog box, one of the tools you can use to create a new task. The History tab allows you to see exactly how, whether, and when a task has run. Figure 3 shows the History tab for RacTask.

Figure 3. The History tab lets you confirm that a scheduled task has run as expected.


When you display the History tab, the relevant portion of the Event Viewer snap-in snaps in, showing you all the recent events relating to the selected task. This is exactly what you would see if you ran Eventvwr.msc, navigated in the console tree to Applications And Services Logs\Microsoft\Windows\TaskScheduler\Operational, and filtered the resulting log display to show events relating to the selected task. (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 not running successfully when it should, you can double-click the appropriate event entry and read whatever details the event log has to offer.

Task Scheduler Terminology

As you go through the steps to create or edit a task, you'll encounter the following terms:

  • Trigger The time at which a task is scheduled to run, or the event in response to which a task is to run. A task can have multiple triggers.

  • Action What the task does. Possible actions include starting a program, sending an e-mail message, and displaying a message on screen. A task can have multiple actions, in which case the actions occur sequentially in the order in which you assign them.

  • Condition An additional requirement that, along with the trigger, must be met for the task to run. For example, a condition might stipulate that the task run only if the computer has been idle for 10 minutes or only if it's running on AC power.

  • Setting A property that affects the behavior of a task. With settings, you can do such things as enable a task to be run on demand or set retry parameters to be followed if a task fails to run when triggered.


Other -----------------
- Using Microsoft Management Console (part 2) - Creating Your Own MMC Consoles
- Using Microsoft Management Console (part 1)
- Using Advanced System Management Tools : Finding and Decoding Information in System Information
- Using Advanced System Management Tools : Viewing System Information
- Security Essentials - Preventing Unsafe Actions with User Account Control
- Security Essentials - Stopping Spyware with Windows Defender
- Security Essentials - Blocking Viruses and Worms with an Antivirus Program
- Blocking Intruders with Windows Firewall (part 2) - Allowing Connections Through the Firewall
- Blocking Intruders with Windows Firewall (part 1)
- Monitoring Your Computer's Security
- Recording and Watching TV
- Using Windows Live Web Services
- Using Windows Live Programs (part 3) - Using Windows Live Photo Gallery
- Using Windows Live Programs (part 2) - Using Windows Live Mail
- Using Windows Live Programs (part 1) - Obtaining a Windows Live ID & Using Windows Live Messenger
- Using Speech Recognition and Voice Commands
- Reading, Writing, and Editing with Pen and Touch Tools (part 1) - Using Gestures in Windows 7
- Reading, Writing, and Editing with Pen and Touch Tools (part 1) - Using Gestures in Windows 7
- Enabling and Customizing Pen and Touch Features
- Working with (and Around) Digital Rights Management
 
 
Most view of day
- Managing Windows Licensing and Activation : Managing Volume License Activation (part 3) - Managing licensing and activation, Implementing KMS activation
- SQL Server 2012 : Latch Contention Examples - Queuing
- Windows Server 2012 : Deploying Storage Spaces (part 4) - Planning a Storage Spaces deployment - Availability, Management
- Windows 7 Mobility Features : Working with the Windows 7 User Interface
- Maintaining Security : Restricting Content in Windows Media Center, Creating Trusted Contacts, Installing Critical Fixes
- BizTalk 2010 : ASDK SQL adapter examples (part 2) - Select, Table Valued Function, and Execute Reader
- Microsoft Systems Management Server 2003 : Running Software Metering Reports
- Adobe Dreamweaver CS5 : Using Library Items and Server-side Includes (part 5) - Updating Your Web Sites with Libraries
- Configuring Startup and Troubleshooting Startup Issues : Important Startup Files
- Windows Phone 8 : Configuring Basic Device Settings - Phone Storage
Top 10
- SQL Server 2012 : Latch Contention Examples - UP Latches in tempdb, Spinlock Contention in Name Resolution
- SQL Server 2012 : Latch Contention Examples - Queuing
- SQL Server 2012 : Latch Contention Examples - Inserts When the Clustered Index Key Is an Identity Field
- SQL Server 2012 : Latches and Spinlocks - Monitoring Latches and Spinlocks
- SQL Server 2012 : Latches and Spinlocks - SuperLatches/Sublatches
- SQL Server 2012 : Latches and Spinlocks - Latch Types, Latch Modes
- Sharepoint 2013 : Overview of The Client-Side Object Model and Rest APIs - Client-Side Object Model API Coverage
- Sharepoint 2013 : Overview of The Client-Side Object Model and Rest APIs - REST and OData (part 3) - Creating, Updating, and Deleting
- Sharepoint 2013 : Overview of The Client-Side Object Model and Rest APIs - REST and OData (part 2) - Filtering and Selecting
- Sharepoint 2013 : Overview of The Client-Side Object Model and Rest APIs - REST and OData (part 1) - Getting Started with REST and OData
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro