Understanding the Task Scheduler Architecture
Task Scheduler supports an isolation model in which each set of tasks running in a specific security context is started in a separate session. Task Scheduler engines running in transient processes in the user or computer context process the execution defined to be started by a trigger. Tasks can be started in a computer account context such as LocalSystem, LocalService, or NetworkService, or they may be started in a specified user context. Task Scheduler also attempts to ensure task integrity even when a user's domain credentials are updated (applies to Windows Server 2003 domains only).
Tasks can be started either locally or remotely. Each task may contain multiple actions running in series. Multiple tasks can be started in parallel or serially to perform a series of synchronized operations using the events logged by the service. A set of predefined events in the System event log as well as the private Task Scheduler Operational event log are used to record each action's execution status for monitoring, synchronization, and health management.
The simplified block diagram shown in Figure below illustrates the high-level architecture implemented in Task Scheduler 2.0 (the version in Windows Vista and later).
Task Scheduler combines several components that work together to provide the Task Scheduler user interface, the task execution engine, and event tracking and management. Specifically:
- The Task Scheduler user interface has been redesigned in the MMC .NET snap-in SchedTask.msc. This GUI includes a wizard for creating and configuring tasks and property pages that accesses the Task Scheduler service through its COM API.
- A shared Svchost.exe loads the Task Scheduler Service DLL SchedSvc.dll using a LocalSystem account, uses the TaskSchd.dll component to interface with the Resource Manager, and uses S4U to obtain the required credentials. This service DLL also reads configuration information from the registry and writes job tasks to the disk in XML format.
- The Transient Control Process engine TaskEng.exe runs in the context of the taskdefined user account, logs Event Log status events, and generates user processes that execute actions defined by the task.
- The TaskComp.dll component provides backward compatibility for management and execution of tasks that were created in previous versions of Windows.
In this tutorial:
- Windows 7 Desktop Maintenance
- Performance Monitoring
- Improvements to Performance Monitoring in Windows 7
- Using Performance Monitor
- Real-Time Performance Monitoring
- Performance Monitor Logging
- Creating a Data Collector Set
- Configuring a Data Collector Set
- Using Data Manager to View Performance Data
- Starting and Stopping Data Logging
- Viewing Performance Data
- Comparing Performance Monitor Logs
- Performance Monitor User Rights
- Remote Data Collection
- Using Windows PowerShell for Performance Monitoring
- Resource Monitor
- Overview Tab
- CPU Tab
- Memory Tab
- Disk Tab
- Network Tab
- Reliability Monitor
- How Reliability Monitor Works
- Windows Performance Tools Kit
- Event Monitoring
- Understanding the Windows Event Architecture
- Channels
- Improvements to Event Monitoring in Windows 7
- Using Event Viewer
- Understanding Views
- Viewing Event Logs
- Saving Event Logs
- Configuring Event Subscriptions
- Considerations for Workgroup Environments
- Creating a New Subscription
- Using the Windows Events Command-Line Utility for Event Monitoring
- Using Windows PowerShell for Event Monitoring
- Using Task Scheduler
- Improvements to Task Scheduler in Windows 7
- Understanding Tasks
- Understanding the Task Scheduler Architecture
- Understanding Task Scheduler Security
- Credentials Management
- Securing Running Tasks
- Understanding AT and Task Scheduler v1.0 Compatibility Modes
- Understanding the Task Scheduler Snap-in
- Understanding Default Tasks
- Creating Tasks
- Defining Triggers
- At Startup Trigger
- On Connection To AND Disconnect From User Session Triggers
- On Workstation Lock AND Unlock Triggers
- Defining Actions
- Defining Conditions
- Defining Settings
- Managing Tasks
- Viewing History
- Using SchTasks.exe for Creating and Managing Tasks
- Task Scheduler Events
- Troubleshooting Task Scheduler
- Tasks Won't Run If the Service Is Not Started
- The Task Will Run Only When a Certain User Is Logged On
- The Task Action Failed to Execute
- Interpreting Result and Return Codes
- Understanding the Windows System Assessment Tool
- Understanding WinSAT Assessment Tests
- Examining the WinSAT Features Assessment
- Running WinSAT from the Command Line
- Understanding WinSAT Command Exit Values
- Running WinSAT Using Performance Information and Tools
- System Capabilities Section
- OEM Upsell And Help Section
- Understanding Windows Error Reporting
- Overview of Windows Error Reporting
- How WER Works
- Store Management System
- ReportArchive Folder
- WER Service
- Understanding the Error Reporting Cycle
- Understanding WER Data
- Configuring WER Using Group Policy
- Configuring WER Using the Action Center