Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Using the Windows 7 Task Scheduler (part 1)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
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
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server