Scheduling a Program to Run on a Schedule

by Barry Dysert
(last updated July 30, 2018)

1

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,on Windos 7 go to Start | All Programs | Accessories | System Tools | Task Scheduler. Windows displays the Task Scheduler dialog box. On Windows 10 click the start button in the bottom left corner then type "Task Scheduler" and press enter. (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, 8, and 10.

Author Bio

Barry Dysert

Barry has been a computer professional for over 35 years, working in different positions such as technical team leader, project manager, and software developer. He is currently a software engineer with an emphasis on developing custom applications under Microsoft Windows. When not working with Windows or writing Tips, Barry is an amateur writer. His first non-fiction book is titled "A Chronological Commentary of Revelation." ...

MORE FROM BARRY

Understanding the Search Index

You can utilize Explorer's search utility to find text within files. To make searches fast, Windows maintains a search ...

Discover More

Determining if You Have 32-bit or 64-bit Windows

There are occasions when you may want to know whether you're running the 32-bit or 64-bit version of Windows. This tip ...

Discover More

Accessing a Network Drive

Being on a network is great because it allows you to share resources among the networked systems. Being able to access a ...

Discover More
More WindowsTips

How to Run a Program when Windows Starts

It's easy to have a program run when Windows starts. In fact, by using the Task Scheduler, you can have all sorts of ...

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 ...

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 two more than 2?

2018-07-30 10:04:49

Will

I was very excited to see this but was disappointed when I saw "send an email" and "display a message" deprecated. It seems like a useful feature no longer exists. Puzzled.


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.