Support
 
Phone Live Chat
 
Support
 
US: +1 888 720 9500
 
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9393

 
 
 
 
 
Features

Why use Group Policy to deploy a scheduled task?

Creating a scheduled task by hand on each machine works fine for a lab. It does not work for a domain with hundreds of endpoints, and it does not survive a reimage. Group Policy Preferences (GPP) lets you define the task once in the Group Policy Management Console (GPMC), link the GPO to the right organizational unit (OU), and have every computer in that scope pick up the task on its next Group Policy refresh. The same mechanism handles reruns of shutdown -r for nightly reboots, scheduled PowerShell scripts that pull files from SYSVOL, agent installs, and maintenance jobs that need to run as SYSTEM.

The catch is that GPP-scheduled tasks have more moving parts than most admins expect: the right configuration node, the right action mode, the right trigger, item-level targeting, and (for user-context tasks deployed on a computer OU) loopback processing. Getting any of those wrong tends to produce the same symptom and the task does not appear on the client with any clear error.

Prerequisites

  • Have a workstation or domain controller with the GPMC installed. On Windows 10 and 11, install it through RSAT.
  • Have Domain Administrator rights or delegated permission to create and link GPOs on the target OU.
  • For PowerShell or batch actions, the script file should already be placed on SYSVOL or another UNC path readable by the target machines' computer accounts.

How to create a scheduled task using GPP

The walk-through below uses GPP, the standard mechanism for deploying scheduled tasks via GPO on Windows 7 and later.

Step 1: Create or open a GPO in the GPMC

  1. Press Win + R, type gpmc.msc, and press Enter.
  2. Expand Forest > Domains > [your domain].
  3. Right-click the OU that contains the target computers or users and select Create a GPO in this domain, and Link it here. Give the GPO a descriptive name.
  4. Right-click the new GPO and select Edit to open the Group Policy Management Editor.

If you do not have an OU dedicated to the target machines yet, create one in Active Directory Users and Computers before linking the GPO. Linking at the domain root applies the task to every computer in the domain, which is not ideal.

Step 2: Navigate to the Scheduled Tasks node

Step 3: Create the task

Step 4: Configure the General tab

Step 5: Add a trigger

Step 6: Configure the action

Step 7: Filter the deployment with item-level targeting

Step 8: Apply the GPO and verify

Troubleshooting tips

  • The GPO is linked but the client has not refreshed

    Group Policy applies on logon and roughly every 90 minutes after that. Force it with gpupdate /force on the client, or use ADManager Plus to force GPO update.

  • Action mode mismatch

    If you changed the task settings in GPP but the action is still set to Create, existing clients keep their old version. Switch to Update or Replace so the change reaches machines that already received the original.

  • The XML in SYSVOL never replicated

    If you see the task in GPMC but \\domain\SYSVOL\domain\Policies\{GUID}\Machine\Preferences\ScheduledTasks\ScheduledTasks.xml is missing or differs from another domain controller, you have a SYSVOL replication problem. Check DFSR health before checking GPO settings.

  • Wrong configuration branch for the trigger

    A task with an At startup trigger under User Configuration will never execute as startup is not a user context event. A Computer Configuration task on a GPO linked only to a user OU will never apply, because Computer Configuration only applies to computer objects in that OU's scope.

  • Missing loopback processing for user tasks on a computer OU

    If you put a User Configuration scheduled task on a GPO linked to a computer OU (common for kiosks and RDS), the task will not deploy unless loopback processing is enabled on the same GPO.

  • Permission failure on the script path

    A task that runs as SYSTEM cannot read a network share mapped under a user account. If your action points to \\server\share\script.ps1, confirm the target computer's machine account (DOMAIN\COMPUTERNAME$) has read access to the share.

  • Script fails silently

    Check Event Viewer > Applications and Services Logs > Microsoft > Windows > TaskScheduler > Operational on the client for the task's history. Event ID 201 logs completed actions with their exit codes; non-zero codes point to the failure.

Deploying a scheduled task via startup script and schtasks

When GPP cannot model the task you need, for example, you require a per-machine random delay or a registration trigger GPP does not expose, use a GPO startup script that calls schtasks /create.

Click to copy script
schtasks /create /sc daily /tn "NightlyCleanup" /tr "powershell.exe -ExecutionPolicy Bypass -File C:\Scripts\Cleanup.ps1" /ru SYSTEM /st 02:00 /f

Save the command in a .bat file, store it under SYSVOL, and reference it from Computer Configuration > Policies > Windows Settings > Scripts (Startup/Shutdown) > Startup. The script runs once per boot; the /f switch makes the schtasks command repeatable so a second pass replaces the existing task rather than failing.

Centralize GPO management and reporting with ADManager Plus

The GPP workflow above creates the scheduled task one GPO at a time, in one OU at a time, and gives admins no central view of which GPOs are deployed where, which contain scripts, or who modified them last. ADManager Plus offers GPO management and reporting capabilities that close those gaps with bulk management, reporting, and delegated administration in one place.

  • GPO creation and linking: Create new GPOs and link or unlink them across multiple OUs from a single console. Manage GPO links to resolve precedence conflicts, copy a configured GPO to other domains, and merge settings from multiple GPOs into one without switching consoles.
  • Force GPO updates without RDP: Trigger an immediate Group Policy refresh on selected computers from the console. No need to RDP into each machine or push gpupdate /force through a separate remote tool when a scheduled task GPO needs to land on clients now.
  • GPO reports that answer the questions admins actually ask: After deploying a task, GPO reports provide insights on recently created or modified GPOs. They can also be scheduled to run automatically and exported as CSV, PDF, HTML, or XLSX.
  • Delegate GPO tasks without domain admin rights: Grant help desk technicians the right to update or report on specific GPOs in specific OUs through role-based delegation.
  • Manage without RSAT: Any administrator or delegated technician can manage GPOs from their own machine using ADManager Plus without installing RSAT or maintaining a dedicated jump box.

FAQ

1. How do I create a scheduled task using a GPO?

Open the GPMC (gpmc.msc), create or edit a GPO, and link it to the OU containing the target computers or users. In the Group Policy Management Editor, navigate to Computer Configuration > Preferences > Control Panel Settings > Scheduled Tasks for machine-context tasks, or User Configuration > Preferences > Control Panel Settings > Scheduled Tasks for user-context tasks. Right-click in the empty pane, choose New > Scheduled Task (At least Windows 7), then fill in the General, Triggers, Actions, and Common tabs. Run gpupdate /force on a target machine to apply the GPO, and verify the task in taskschd.msc.

2. What is the difference between a scheduled task and an immediate task in a GPO?

A scheduled task is persistent—it runs on the trigger you define and stays on the client until the GPO is unlinked or set to delete. An immediate task runs once, as soon as the GPO is applied on the client, then deletes itself. Use a scheduled task for anything recurring, such as nightly reboots, weekly cleanups, and scheduled scripts. Use an immediate task for one-off remediation, like deploying a hotfix script, kicking off a configuration change, or triggering an agent install across the estate without leaving a permanent entry in Task Scheduler.

3. How do I configure triggers for a GPO scheduled task?

On the Triggers tab of the scheduled task item, click New and choose a trigger type from the Begin the task drop-down. The common options are On a schedule, At log on, At startup, and On an event. Set the start date and time, and check Synchronize across time zones if endpoints span regions and the task should fire at one absolute time.

4. Should I use the Create, Replace, or Update action in GPO Preferences?

The right action depends on how the task should behave when it already exists on the client:

  • Create runs only if the task does not already exist and existing tasks of the same name are left alone. Use this for the initial deployment of a brand-new task.
  • Update modifies an existing task to match the GPO settings, or creates it if missing. This is the safest default for ongoing management, as settings stay in sync without wiping any local history or properties not defined in the GPO.
  • Replace deletes the existing task and recreates it from the GPO every time the policy applies. Use this when you have changed task settings significantly and need to be certain clients drop their old version.
  • Delete removes a task that was previously deployed by GPO. Use this to retire a task cleanly across the domain.

5. Is a GPO scheduled task the same as the Task Scheduler?

They're related but not the same. Task Scheduler, also known as askschd.msc, is the Windows component that actually runs scheduled tasks on each machine. A GPO scheduled task is a GPP item that creates a Task Scheduler entry on every computer in a linked OU, deployed from a single console instead of configured per-machine. Once the GPO applies, the task appears in Task Scheduler on the client, where the local engine takes over and runs it on the trigger you defined.

Streamline AD management with ADManager Plus

ADManager Plus Trusted By

The one-stop solution to Active Directory Management and Reporting