Scheduling a Program to Run on a Schedule

by Barry Dysert
(last updated May 18, 2015)

If you have a program that you want to run on a schedule, you'll want to use the Windows Task Scheduler. (Understanding the Scheduler is covered under a separate tip.) To launch the Task Scheduler, go to Start | All Programs | Accessories | System Tools | Task Scheduler. Windows displays the Task Scheduler dialog box. (See Figure 1.)

Figure 1. The Task Scheduler dialog box.

Let's say that you have a program named CopyFiles.exe that you'd like to run automatically every day at 2:00 a.m. At the right side of the Task Scheduler dialog box, under the Actions list, you can start by clicking the Create Basic Task option. This starts the Create Basic Task Wizard. (See Figure 2.)

Figure 2. The Create Basic Task Wizard dialog box.

At the left side of the wizard dialog box you can see that there are four steps to be finished. The first step is to provide a name and description for this task. (The name is mandatory; the description is optional.) Since we want this task to run a program called CopyFiles.exe, let's name the task "Copy files." For its description we can put something like "Copy files from my Working folder to my Backup folder." After entering the information, click the Next button and you'll see the second step of the wizard. (See Figure 3.)

Figure 3. Defining the trigger for the task.

In this second step you need to define the trigger for your task, initially by specifying how often the task will run. Windows allows you to start your task when certain events occur or according to a schedule. Since we want our task to run every day you should select the "Daily" option and click the Next button to proceed to the next step. (See Figure 4.)

Figure 4. Specifying details for a daily task.

In this step you further refine the trigger by specifying when you want the task to first start and the time each day when it should run. This task is going to start at 2:00 a.m. every day, so that needs to be entered. You can then click the Next button to advance to the next step. (See Figure 5.)

Figure 5. Defining the action for the task.

Here is where you select what action is to be performed when the task starts. We can display a pop-up message on the desktop, send an e-mail, or start a program. We want to start a program, so we select that option and click the Next button to get to the next step. (See Figure 6.)

Figure 6. Specifying details for the action.

Since you indicated you wanted to start a program, you now have to choose which program to start. You specify the name of the program you want to run ("CopyFiles.exe"). If the program required command-line arguments to be passed to it, you could fill in the Add Arguments field. Similarly, if the program needed to be started in a particular folder, you could specify that in the Start In field. Since this example program requires neither, you can click the Next button to get to finish up the task definition. (See Figure 7.)

Figure 7. The Create Basic Task Wizard summary.

The final step of the wizard presents a summary of the information that you specified for the task. If you review the information and realize you made a mistake, you can click the Back button as needed to go back and change things. Once you're satisfied that the task has been correctly specified, click the Finish button and the task is created. It will run according to the schedule you specified.

 This tip (12442) applies to Windows 7.

Author Bio

Barry Dysert

Barry has been a computer professional for over 30 years, working in different positions such as technical team leader, project manager, and software developer.  He is currently a senior software engineer with an emphasis on developing custom applications under Microsoft Windows. ...

MORE FROM BARRY

Updating a Device Driver

If you attach a new device to your computer or need to update a current device's driver, this tip provides the general ...

Discover More

Using Batch Files, Part 2

This tip is part of a series that talks about Windows batch files. It introduces a few more commands and special characters ...

Discover More

Using Powercfg to Change a Setting in the Current Power Scheme

The Powercfg utility allows you to control how power is used on your system. This tip shows you how to use this command-line ...

Discover More
More WindowsTips

Modifying or Deleting a Program's Schedule

Windows makes it easy to define tasks and to run them on a regular schedule. If you later want to modify or delete a task, ...

Discover More

Using the Task Scheduler from the Command Line

In another tip you learned a bit about the Windows Task Scheduler. There may be times, however, when you want to perform Task ...

Discover More

Understanding the Task Scheduler

If you want to have a program run at a certain time or when a specific system event occurs, you'll want to understand the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.