How to Create a Task to Run a Program in Windows Task Scheduler - dummies

How to Create a Task to Run a Program in Windows Task Scheduler

By Dan Gookin

In Windows 7 and Windows Vista, Defrag, Backup, System Restore, and Check Disk are scheduled for you. So, it’s unlikely you will need to create a task for general maintenance. But, to illustrate some important points about running programs as tasks, the following steps describe how to schedule a task that prints a document.

1Create a Notepad document

From the Start menu, choose All Programs→Accessories→Notepad. Type some text in the new document.

Save as print-sample.txt to your Documents folder and close Notepad.

2Open the Task Scheduler window.

Open Control Panel and choose System and Security (Windows 7) or System and Maintenance (Windows Vista). Then select Administrative Tools and, finally, Task Scheduler.

3Choose the folder in which to create your task.

If you haven’t created a folder for your tasks, you would be wise to do so.

4Choose Create Basic Task on the right side.

The Create Basic Task Wizard appears.

5Type a name for the task in the Name box.

For example, Print Document Text.

6Type a description in the Description box.

For example, Print a document on the printer every day at noon.

7Click the Next button.

Your next step is to decide what event must take place to trigger the task.

8Choose Daily, followed by the Next button.

For time-driven triggers, you must specify the start time and interval. For event triggers, such as logging in to Windows, you can skip the time-driven steps.

9Enter the starting date and time, plus any additional time settings.

Set the time to 12:00:00 PM. and the repeat time to 1 day, to have the event trigger every day at noon.

10Click the Next button.

You need to choose an action.

11Choose Start a Program.

Use the Browse button to set the program name, any options, plus the Start In folder if necessary.

For this example, type %windir%notepad.exe in the Program/script box and /p print-sample.txt in the Add Arguments (Optional) box and %userprofile%documents in the Start In (Optional) text box.

The command line options are rarely documented in Windows. The Microsoft support page can be of some help.

12Click the Next button and then the Finish button.

The task has been created. If you don’t want something to print every day at noon, disable or delete the task.