For computers that are running Windows Server® 2008 R2, Windows® 7, Windows Server 2008, or Windows Vista®, Scheduled Task (Windows Vista and later) preference items let you create, replace, update, and delete tasks and their associated properties. Before you create a Scheduled Task preference item, you should review the behavior of action possible with this extension.
Configuring a Scheduled Task (Windows Vista and later) item
To create a new Scheduled Task preference item |
-
Open the Group Policy Management Console. Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit.
-
In the console tree under Computer Configuration or User Configuration, expand the Preferences folder, and then expand the Control Panel Settings folder.
-
Right-click the Scheduled Tasks node, point to New, and select Scheduled Task (Windows Vista and later).
-
In the New Task (Windows Vista and later) Properties dialog box, select an Action for Group Policy to perform. (For more information, see "Actions" in this topic.)
-
Enter a Name for the task to be configured or deleted. (For more information, see "General task settings" in this topic.)
-
If creating, updating, or replacing a task:
- On the General tab, and configure security options for
the task. (For more information, see "General task settings" in
this topic.)
- Click the Triggers tab, and configure when the task
begins and with what frequency it runs. (For more information, see
"Triggers" in this topic.)
- Click the Actions tab, and configure one or more actions
for the task to perform, such as starting a program, sending an
e-mail, or displaying a message. (For more information, see "Task
actions" in this topic.)
- Click the Conditions tab, and configure the conditions
required for the task to run other than those specified on the
Triggers tab. (For more information, see "Other task
settings" in this topic.)
- Click the Settings tab, and enter any additional task
settings for Group Policy to configure. (For more information, see
"Other task settings" in this topic.)
- On the General tab, and configure security options for
the task. (For more information, see "General task settings" in
this topic.)
-
Click the Common tab, configure any options, and then type your comments in the Description box. (For more information, see Configure Common Options.)
-
Click OK. The new preference item appears in the details pane.
Actions
This type of preference item provides a choice of four actions: Create, Replace, Update, and Delete. The behavior of the preference item varies with the action selected and whether the task already exists.
Create |
Create a new scheduled task for users or computers. |
Delete |
Remove a scheduled task for users or computers. |
Replace |
Delete and re-create scheduled tasks for users or computers. The net result of the Replace action is to overwrite all existing settings associated with the task. If the task does not exist, then the Replace action creates a new scheduled task. |
Update |
Modify the settings of an existing scheduled task for users or computers. This action differs from Replace because it only updates settings that are defined within the preference item. All other settings remain as configured in the task. If the task does not exist, then the Update action creates a new scheduled task. |
General task settings
Note | |
All text fields accept preference processing variables. Press F3 to display a list of variables from which you can select. |
Name |
Type a name for the task. This name will appear in the list of tasks in Task Scheduler under Administrative Tools. To change or delete a task, this name must match the name of the existing task as it appears in Task Scheduler. Preference items that configure tasks with the same task name can conflict. |
||||
Description |
Type a description of the task. This description is visible for users or computers to which this preference item is applied. |
||||
Security options |
Configure the security context under which the task is run.
|
||||
Hidden |
Configure whether the task is hidden by default. In Task Scheduler, end-users can click View and Show Hidden Tasks to display hidden tasks. |
||||
Configure for |
For computers that are running Windows Server 2008 R2, Windows 7, Windows Server 2008, or Windows Vista, you can restrict the options displayed to those that are also available in previous operating systems. Doing this does not configure the task or the preference item to run on earlier operating systems. |
Triggers
If creating, updating, or replacing a task, configure when the task begins and the frequency with which to run the task on the Triggers tab. For a task scheduled to run daily, weekly, monthly, or one time only, select the start time at which to begin the task.
Configure any optional scheduling settings desired:
- To configure a daily, weekly, or monthly task
to run only during a specific range of dates, click the New
button, specify the frequency, enter a Start date, select
the Expire check box, and enter an End date.
- To run the task more frequently than daily,
click the New button, select Repeat task every, and
configure the frequency and end time or duration.
- Select the Enabled check box so that
the task can run. To configure a trigger without letting it run,
clear this check box.
Task actions
Note | |
All text fields accept preference processing variables. Press F3 to display a list of variables from which you can select. |
A task can start a program, send an e-mail, or display a message. If configuring a task to start a program, on the Actions tab click New, select Start a program, and configure the following options:
Program/script |
Enter the command to be run, excluding any arguments. |
Add arguments (optional) |
Type any command-line arguments required. |
Start in (optional) |
To specify the working directory for the command being run (typically to ensure the correct resolution of any relative file names), type the working directory used when the task is run. Do not include quotation marks or a trailing slash. |
Other task settings
By configuring options on the Conditions tab, you can restrict the conditions under which a task can run or wake the computer to run a task. On the Settings tab, you can configure options to manage the behavior of the task upon completion, to manage the behavior of the task if a problem occurs, or to manage the behavior of the task if an instance of the task is already running.
Additional considerations
- You can use item-level targeting to change
the scope of preference items.
- Preference items are available only in
domain-based GPOs.
Additional references
- Scheduled Tasks
Extension
- For additional information on configuring
settings in Windows, see the Windows Server 2008 TechCenter
(http://go.microsoft.com/fwlink/?LinkId=91710).