Export (0) Print
Expand All
6 out of 17 rated this helpful - Rate this topic

Configure a Scheduled Task Item (At least Windows 7)

Updated: November 30, 2012

Applies To: Windows 8, Windows Server 2008 R2, Windows Server 2012

For computers that are running Windows Server® 2012 or Windows® 8, Scheduled Task (At least Windows 7) preference items, ( Scheduled Task (Windows Vista and later) if running Windows Server® 2008 R2 or Windows® 7), 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.

ImportantImportant
Scheduled Task (Windows Vista and later) preference items, ( Scheduled Task (Windows Vista and later) if running Windows Server® 2008 R2 or Windows® 7), can only be used to manage scheduled tasks for computers that are running Windows Server 2012, Windows 8, Windows Server 2008 R2 and Windows 7.

Configuring a Scheduled Task (At least Windows 7) or Scheduled Task (Windows Vista and later) item

To create a new Scheduled Task preference item

  1. Open the Group Policy Management Console . Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit .

  2. In the console tree under Computer Configuration or User Configuration , expand the Preferences folder, and then expand the Control Panel Settings folder.

  3. Right-click the Scheduled Tasks node, point to New , and select Scheduled Task (At least Windows 7) , if running Windows Server 2012 or Windows 8, or Scheduled Task (Windows Vista and later) , if running Windows Server 2008 R2 or Windows 7.

  4. In the New Task (At least Windows 7) Properties dialog box, if running Windows Server 2012 or Windows 8, (or New Task (Windows Vista and later) Properties dialog box, if running Windows Server 2008 R2 or Windows 7), select an Action for Group Policy to perform. (For more information, see Task actions in this topic.)

  5. Enter a Name for the task to be configured or deleted. (For more information, see General task settings in this topic.)

  6. If creating, updating, or replacing a task:

    1. On the General tab, and configure security options for the task. (For more information, see General task settings in this topic.)

    2. Click the Triggers tab, and configure when the task begins and with what frequency it runs. (For more information, see Triggers in this topic.)

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

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

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

  7. Click the Common tab, configure any options, and then type your comments in the Description box. (For more information, see Configure Common Options.)

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

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

  • If the preference item is part of Computer Configuration , by default the task is run in the security context of the SYSTEM account.

  • If the preference item is part of User Configuration , by default the task is run in the security context of the logged-on user. Unless you provide credentials, the task is run only if the user is logged on to the computer, but can continue after the user logs off.

  • To run a task under the security context of a specified account (regardless of whether that account is logged on), click Change User or Group , enter credentials for the account, and then click Run whether user is logged on or not .

security Security Note
This password is stored as part of the GPO in SYSVOL and is discoverable, although obscured. If you choose to store passwords in preference items, you should consider creating dedicated accounts for this purpose, and never store administrative passwords in preference items.

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.

noteNote
You can apply a trigger to a specific group for computers that run Windows Server 2008 R2 or Windows 7 only for triggers that begin a task:

  • At log on

  • On connection to user session

  • On disconnect from user session

  • On workstation lock

  • On workstation unlock

Task actions

noteNote
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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.