Using Task Scheduler
Task Scheduler is an MMC snap-in that lets you schedule automated tasks that perform actions according to scheduled times or when specific events occur. Task Scheduler maintains a library of all scheduled tasks and provides an organized view of these tasks and an interface for managing them. The Windows 7 version of Task Scheduler is essentially the same as that found in Windows Vista, which improved upon earlier versions of Windows by providing a better user interface, more flexible scheduling, enhanced security, and improved manageability. Specifically, the following enhancements to Task Scheduler were introduced in Windows Vista:
- User interface improvements The Windows Vista version of Task Scheduler introduced a completely new user interface based on the MMC. This interface includes a number of new conditions and filters to assist administrators in defining and managing scheduled tasks.
- Scheduling improvements Time-based task launch is improved, with more detailed control 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 also 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 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. Improved credentials management provided by S4U and Credentials
Manager also increases reliability and reduces maintenance overhead. 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.
- System tasks run in the system session (session 0), while user tasks run in the user's session.
- Administrative improvements The version of Task Scheduler in Windows Vista introduces features that 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, which can be found 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 e-mail to be sent to 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 also fully available to scripting languages.
- Platform and manageability improvements The version of Task Scheduler in
Windows Vista 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
- Nonpresentation mode
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