The Windows Learning Center

How to Use Task Scheduler to Automatically Run Programs

Summary

Windows 7 comes with a native application for scheduling programs and scripts to run at specific times or when certain events occur. Here is how to use it.

Accessing Task Scheduler

As is usually the case in Windows, there are several ways to open Task Scheduler. A quick way is to enter “sched” (without quotes) in the Start search box.

Since Task Scheduler is a snap-in for the Microsoft Management Console in Windows 7, you can also enter taskschd.msc in the Run line. The Run line can be opened by entering the keyboard combination Windows key+R.

Yet another way to open Task Scheduler is by going to Control Panel-System and Security-Administrative Tools-Schedule tasks.

The Microsoft Management Console that opens is a three-pane interface as shown in Figure 1 below.

Figure 1. Task Scheduler interface

Scheduling a Basic Task

For scheduling many typical tasks, using the Create Task wizard is the easiest procedure. In the right pane of the Task Scheduler shown in Figure 1, click the entry "Create Basic Task..." The dialog that opens is shown in Figure 2 below.

Figure 2. Create basic task

Provide a name and description of the task you wish to create and click "Next". A dialog (Figure 3) for choosing what causes the task to run will open. You can choose specific times or events such as when the computer starts. You can also name specific events that are logged by the Event Viewer. Event Viewer is another snap-in for the Microsoft Management console. Most average PC owners will be interested in tasks that run at particular time intervals. In the example here, I will be using a task that runs daily.

Figure 3. Choosing a trigger for the task

When you have picked a triggering event or time span, click "Next". If you have chosen a time period for the task, the dialog in Figure 4 will open.

Figure 4. Configuring the time period

When you have chosen the parameters for the time period, click "Next" and the Action dialog shown in Figure 5 will open. Generally, "Start a Program" will be what is involved.

Figure 5. Choosing the action for the task

After selecting the action, click "Next". the window shown in Figure 6 will open. Enter the full path and name of the file or script that you wish to schedule. You can use the "Browse" button to navigate to the desired object.

Figure 6. Selecting the file or script

After you have entered the program file or script to be scheduled, click "Next" and the window shown in Figure 7 will appear.

Figure 7. Summary of scheduled task

The window will list the properties of the task you have created. Check if these are correct, make any necessary changes, and click "Finish". The new task will be added to the schedule.

Creating a Task with Additional Properties

You can also create a task with additional properties and conditions. Open the Task Scheduler interface shown in Figure 1 and click "Create Task..." The dialog shown below in Figure 8 will open.

Figure 8. Create a task with more conditions

More detail on how to create a task with additional parameters is at this page.