For computers that are running Windows Server® 2008 R2, Windows® 7, Windows Server 2008, Windows Vista®, Windows Server 2003, or Windows XP, Scheduled Task preference items let you create, replace, update, and delete scheduled tasks and their associated properties. Before you create a Scheduled Task preference item, you should review the behavior of each type of action possible with this extension.
Configuring a Scheduled Task 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.
-
In the New Scheduled Task Properties dialog box, select an Action for Group Policy to perform. (For more information, see "Actions" in this topic.)
-
On the Task tab, enter task settings for Group Policy to configure or remove. (For more information, see "Task settings" in this topic.)
-
If creating, updating, or replacing a task:
- Click the Schedule tab, and configure one or more
schedules for the task. (For more information, see "Schedule
settings" in this topic.)
- Click the Settings tab, and enter any additional task
settings for Group Policy to configure. (For more information, see
"Other scheduled task settings" in this topic.)
- Click the Schedule tab, and configure one or more
schedules for the task. (For more information, see "Schedule
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 scheduled 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 scheduled task. If the scheduled task does not exist, then the Replace action creates a new scheduled task. |
Update |
Modify 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 scheduled task. If the scheduled task does not exist, then the Update action creates a new scheduled task. |
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 scheduled task. This name will appear in the list of scheduled tasks in Control Panel for users or computers. To modify or delete a task, this name must match the name of the existing task as it appears in Control Panel for computers or users. Preference items configuring tasks with the same task name can conflict. |
||||
Run |
Type the command to be run, excluding any arguments. This field is available only if the action selected is Create, Replace, or Update. |
||||
Arguments |
Type any command-line arguments required. This field is available only if the action selected is Create, Replace, or Update. |
||||
Start in |
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. This field is available only if the action selected is Create, Replace, or Update. |
||||
Comments |
Type a description of the task. This description is visible for users or computers to which this preference item is applied. This field is available only if the action selected is Create, Replace, or Update. |
||||
Run as |
Configure the security context under which the task is run.
These fields are available only if the action selected is Create, Replace, or Update. |
||||
Enabled |
Select this check box so that the task will run. To configure the task for users or computers without letting it run, clear this check box. This check box is available only if the action selected is Create, Replace, or Update. |
Schedule settings
If creating, updating, or replacing a task, configure the frequency with which to run the task on the Schedule tab. For a task scheduled to be 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 let a daily, weekly, or monthly task run
only during a specific range of dates, click the Advanced
button, and select a Start Date and End Date.
- To run the task repeatedly, click the
Advanced button, select Repeat task, and configure
the frequency and end time or duration.
- You can configure multiple schedules. To do
this, select the Show multiple schedules check box. For the
first schedule that you want to create, select a frequency, start
time, and any advanced options for the task. Click New to
add another schedule to the list, and then configure settings for
it. Any schedule modifications are applied to the schedule
currently viewed, but all the schedules are run.
Note To return to a single schedule display, delete all except one of the schedules in the list, and then clear the Show multiple schedules check box.
Other scheduled task settings
If creating, updating, or replacing a task, configure settings to manage the behavior of the task upon completion, if the computer is being used, or under specific power conditions on the Settings tab.
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).