Logo
Lose Weight
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
 
 
Windows Vista

Maintaining Desktop Health : Using Task Scheduler (part 1) - Task Scheduler Architecture

4/22/2013 5:35:01 PM
Task Scheduler in Windows Vista is more reliable, more scalable, and much easier to use than in previous versions of Microsoft Windows. The following sections describe the features and enhancements of this tool.

1. Task Scheduler Enhancements and Improvements

The new Task Scheduler version provides significant improvements in the following areas:

User Interface Improvements

The Windows Vista Task Scheduler features a completely new user interface based on Microsoft Management Console (MMC). The interface includes a number of new conditions and filters to assist administrators in defining and managing scheduled tasks.

Scheduling Improvements

Time-based task launch in Windows Vista Task Scheduler has been improved with higher granularity and enhanced scheduling options. One key improvement allows you to chain a series of actions together instead of having to create multiple scheduled tasks.

You can schedule tasks on demand for execution when a specified event is logged to an event log. You can configure scheduled tasks to wake a computer from sleep or hibernation or to run only when the computer is idle. You can also run previously scheduled tasks when a powered-down computer is turned back on.

Scalability has been improved by removing limitations on the number of registered tasks and allowing multiple instances of a task to run in parallel or in sequence.

Security Improvements

New security features include use of Windows Vista’s new Credentials Manager (CredMan) to securely store passwords needed for running tasks, and also supporting Service for User (S4U) for many scenarios such that passwords do not need to be stored at all.

To further increase security, scheduled tasks are executed in their own session instead of the same session as system services or the current user:

  • Separate per-user credentials are required for Winstations and Desktops.

  • System tasks run in the system session (session 0), while user tasks run in the user’s session.

Improved credentials management provided by S4U and Credentials Manager also increases reliability and reduces maintenance overhead.

Administrative Improvements

Windows Vista also includes features to enhance the administration experience for scheduled tasks.

Scheduled tasks may be activated by Event Log events and may be synchronized using operational events fired by the service (these may be viewed in Event Viewer under Applications And Services Logs/Microsoft/Windows/Task Scheduler/Operational log). Tasks may be configured to retry on failure and activated when resources become available, as in the case of mobile devices that may miss run times of scheduled tasks.

Control and task status monitoring has been improved and now provides detailed failure reporting and task history. Status feedback has been significantly improved. For example, using the detailed events logged by the Task Scheduler about task operation, an administrator can set up an email to be sent to him/her when a failure occurs, including a complete runtime history of the event. In addition, the complete history of executed scheduled tasks can be easily reviewed, and at any time the administrator can view the list of currently running tasks, and run or stop tasks on-demand.

To assist administrators in scripting complex tasks, the Task Scheduler API is now fully available to scripting languages.

Platform and Manageability Improvements

Windows Vista Task Scheduler enables several new features that improve platform operations and manageability. Infrastructure features for application monitoring now allow hosting and activation of troubleshooters and other corrective actions. Periodic data collection has been implemented to improve event detection. Task process prioritization has been improved and quotas may be assigned. Computer resources are used more efficiently by activating tasks based on a true idle state, defined by a combination of the following criteria:

  • CPU, memory, and I/O usage

  • User presence

  • Non-presentation mode

2. Operational Overview

A task has a set of one or more Triggers, execution conditions named Settings, and an execution body named Actions.

Task Triggers

A task trigger is the condition or conditions under which a task is launched. A task trigger defines when a task will begin and can include conditions such as running a task when a system is started, when a user logs on to a computer, or when a specific event is logged in the event log. A task may have one or more triggers defined. This means that the task will be launched whenever one of the triggers’ conditions is met.

Task Settings

Task settings are conditions besides the trigger under which a task will execute, and they also control the behavior of the task. Task settings include conditions such as running the task only if the computer is idle, or running it only if the computer is connected to a specific network. Other task settings include allowing a task to run on demand, allowing to forcefully end a task, defining actions to take when a task fails, and deleting a task after it runs.

Task Actions

A task action is the code that executes when the task is run. The body of a task can be a script, batch file, executable, or a component written as a handler to the Task Scheduler interface. (This applies to operating system components only.) The execution hosts for task actions are called task scheduler engines. A task may define one or more actions to be run consecutively as part of the task execution.

User Interface

The Task Scheduler user interface has been integrated as an MMC console and provides an intuitive experience for administrators. Command line capabilities include use of JOB.EXE in the current shell, the SchTasks.exe command-line tool for administrative and scripting use, and the legacy command-line task interface known as AT.

3. Task Scheduler Architecture

Task Scheduler supports an isolation model in which each set of tasks running in a specific security context is launched in a separate session. Task scheduler engines running in transient processes in the user or computer context process the execution defined for launch by a trigger. Tasks can be launched in a computer account context such as LocalSystem, LocalService, or NetworkService, or they may be launched 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 launched either locally or remotely. Each task may contain multiple actions running in series. Multiple tasks can be launched 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.

Task Scheduler Components

The simplified block diagram shown in Figure 1 illustrates the high-level architecture implemented in Task Scheduler.

Figure 1. Task Scheduler architecture.

Task Scheduler combines several components that work together to provide the Task Scheduler user interface, the task execution engine, and event tracking and management.

The Task Scheduler user interface has been redesigned in the MMC .NET snap-in SchedTask.msc. This graphical user interface includes a wizard for creating and configuring tasks and property pages that accesses the Task Scheduler service through 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 task-defined 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.

Other -----------------
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 4) - Using the Problem Reports And Solutions Control Panel
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 3) - Architecture of Windows Error Reporting, Configuring Windows Error Reporting
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 2) - Conceptual Components
- Maintaining Desktop Health : Understanding Windows Error Reporting (part 1) - Error Reporting Cycle, Report Data Overview
- Maintaining Desktop Health : Using Performance Information And Tools
- Maintaining Desktop Health : Understanding the Windows System Assessment Tool
- Maintaining Desktop Health : Understanding Windows Eventing (part 2) - Event Viewer User Interface
- Maintaining Desktop Health : Understanding Windows Eventing (part 1) - Windows Eventing Capabilities
- Using Voice and Sounds : Associating a Sound with an Event, Using Alternatives to Sound
- Using Voice and Sounds : Letting Your Computer Do the Talking, Creating a Sound File
- Managing Windows Licensing and Activation : Notification Experience and Reduced Functionality Mode
- Managing Windows Licensing and Activation : Managing Volume License Activation (part 3) - Managing licensing and activation, Implementing KMS activation
- Managing Windows Licensing and Activation : Managing Volume License Activation (part 2) - Leveraging MAK activation, Comparing KMS and MAK activation
- Managing Windows Licensing and Activation : Managing Volume License Activation (part 1) - Centralizing activation with KMS
- Managing Windows Licensing and Activation : Licensing Windows
- Maintaining Desktop Health : Monitoring Reliability and Performance (part 6) - Using Reliability Monitor
- Maintaining Desktop Health : Monitoring Reliability and Performance (part 5)
- Maintaining Desktop Health : Monitoring Reliability and Performance (part 4)
- Maintaining Desktop Health : Monitoring Reliability and Performance (part 3)
- Maintaining Desktop Health : Monitoring Reliability and Performance (part 2)
 
 
Most view of day
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting ActiveX Security Options
- Microsoft Lync Server 2013 : Persistent Chat Administration (part 1) - Chat Room Management by Administrators
- HP ProLiant Servers AIS : Memory and Cache
- Windows Phone 8 : Scheduled Tasks - Background Agent Types
- SQL Server 2008 R2 : Creating and Managing Stored Procedures - Using System Stored Procedures
- Maintaining Security : Restricting Content in Windows Media Center, Creating Trusted Contacts
- Windows Home Server 2011 : Maintaining Windows Home Server - Checking Free Disk Space on the System Drive
- Exchange Server 2007 : Migrating from Windows 2000 Server to Windows Server 2003 (part 4) - Replacing Existing Domain Controllers
- Microsoft Dynamics AX 2009 : Integration with Microsoft Office - Exporting data to Microsoft Project
- Microsoft Exchange Server 2013 - Managing mailboxes: The essentials (part 2) - Configuring apps for mailboxes
Top 10
- MDT's Client Wizard : Package Properties
- MDT's Client Wizard : Driver Properties
- MDT's Client Wizard : Application Properties
- MDT's Client Wizard : Operating System Properties
- MDT's Client Wizard : Customizing the Deployment Share
- Windows Server 2012 : Software and User Account Control Administration (part 5) - Maintaining application integrity - Configuring run levels
- Windows Server 2012 : Software and User Account Control Administration (part 4) - Maintaining application integrity - Application access tokens
- Windows Server 2012 : Software and User Account Control Administration (part 3) - Mastering User Account Control - Configuring UAC and Admin Approval Mode
- Windows Server 2012 : Software and User Account Control Administration (part 2) - Mastering User Account Control - Elevation, prompts, and the secure desktop
- Windows Server 2012 : Software and User Account Control Administration (part 1) - Software installation essentials
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro