Logo
CAR REVIEW
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
Windows Vista

Maintaining Desktop Health : Using Task Scheduler (part 5) - Scheduled Tasks Events, Troubleshooting Task Scheduler

4/22/2013 5:46:38 PM

8. Scheduled Tasks Events

In Windows Server 2003 and earlier versions of the Windows operating system, scheduled tasks used a Schedlgu.txt log file to track tasks and their status. Windows Vista implements all new event logs for applications and Task Scheduler now logs all operational information about scheduled tasks into its own event log. The Scheduled Tasks event log Microsoft-Windows-TaskScheduler is located under Application Logs. Important errors or warnings about task or service failures are logged to the System log so that administrators can readily see them and take action.

The Windows Vista Scheduled Tasks component will normally log an event on task registration (at creation), at task launch, and when the task instance has been sent to the engine. Events will also be logged on task failures and any task-related problems.

This section provides examples of typical events that are logged by the Scheduled Tasks service.

Task Registration

An Event ID 106 is logged when a task is created. This event is also referred to as task registration.

Task Launch

Tasks can be launched by either a user request or by a trigger. An Event ID 110 is normally logged when a user manually launches a task. An Event ID 107 is normally logged when a task is launched as the result of a trigger.

Task Execution

An Event ID 319 indicates that the Task Engine received a message from the Task Scheduler service requesting task launch, and is the best indicator of a task launch. In these events, the Task Engine is identified by the user SID, and the task name is also logged.

Task Completion

An Event ID 102 is normally logged when a task completes successfully.

9. Troubleshooting Task Scheduler

Task or service failures are logged to the system event log. It is important to note that the events will vary and be based on what specifically failed. A user will see different events based on whether a task failed to start, or if the task started successfully but the action failed.

The key to troubleshooting Task Scheduler is understanding specifically where the failure occurred in the process. A task is defined as an action, the trigger for the action, the conditions under which the task will run, and additional settings. The event log will show if the failure is in the trigger, the task action, the conditions, or the settings of the task.

Tasks Won’t Run If the Service Is Not Started

If you are having problems scheduling tasks or getting tasks to run correctly, first ensure that the Task Scheduler service is running. You can run services.msc to verify that the Task Scheduler service status is Started.

The Task Did Not Run at the Expected Time

If a scheduled task does not run when you expect it to run, ensure that the task is enabled, and also check the triggers on the task to ensure that they are set correctly. Also, check the history of the task, as shown in Figure 5, to see when the task was started and check for errors.

Figure 5. Task Scheduler History Tab.

The Task Will Run Only If All Conditions Are Met

You can set task conditions on the Conditions tab of the Task Properties dialog box. If conditions are not met or are set up incorrectly, the task will not execute.

The Task Will Only Run When a Certain User Is Logged On

If a scheduled task does not run when you expect it to run, review the Security Options settings in the Task Properties dialog box on the General tab.

The Task Executed a Program But the Program Did Not Run Correctly

If a task attempts to execute a program, but the program does not run correctly, first try running the program manually (not from a task) to ensure that the program works correctly. You may need to add arguments to the program command or define the Start In path using the Add Arguments and/or Start In optional fields.

The Task Failed to Start

An Event ID 101 is normally logged when a task fails to start. In these events, the result code is also displayed. For more information about result and return codes, see “Interpreting Result and Return Codes” later in this section.

The Task Action Failed to Execute

When a task starts but the action configured for the task fails to execute, an Event ID 103 or an Event ID 203 is normally logged. These events also display the return code. For more information about result and return codes, see “Interpreting Result and Return Codes” later in this section.

The Program Specified in the Task Requires Elevated Privileges

If a task is running a program that requires elevated privileges, ensure that the task runs with the highest privileges. You can set a task to run with the highest privileges by changing the task’s security options on the General tab of the Task Properties dialog box.

Interpreting Result and Return Codes

To interpret return codes, you can use a tool such as Err.exe, which you can obtain from the Microsoft Download Center. Err,exe parses source-code header files until it finds a match for the error. In this regard, the Scheduled Tasks service in Windows Vista still functions quite similarly to previous versions of Windows. Return codes from events that occur internally are always translated into hresult code. For example, the login failed event will contain a result code that can be interpreted as a hresult. Task handler tasks also return result codes that you can interpret using the same tools.

However, when an executable is launched and fails for an unknown reason, you have no way of knowing what the result code might mean. The hresult logged in the event log will typically indicate the value returned to the service from the executable itself, and additional research and documentation may be required for accurately interpreting the code.

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 Visio 2010 : Working with Data - Introducing Shape Data Fields
- Microsoft Dynamics CRM 4 : Digital Phone Integration (part 1)
- SQL server 2008 R2 : Creating and Managing Stored Procedures - Using Input Parameters
- Exchange Server 2007 : Leveraging the Capabilities of the Outlook Web Access Client - What’s New in OWA 2007?
- Windows Phone 8 : Configuring Basic Device Settings - Controlling the Keyboard’s Behavior (part 1) - Setting the Keyboard Language
- Windows Server 2012 Requirements and Installation : Installing Server 2012 (part 2) - Server with a GUI Install
- Reporting in Dynamics AX 2009 : Ad Hoc Reporting
- Maintaining Desktop Health : Monitoring Reliability and Performance (part 6) - Using Reliability Monitor
- Microsoft Visio 2010 : Creating Web Pages from Visio Drawings (part 1) - Saving as Web Page
- Windows Phone 8 : Configuring Basic Device Settings - Accessibility (part 1) - Adjusting the Text Size, Enabling High Contrast
Top 10
- Windows Phone 8 : Scheduled Tasks - Scheduled Task API Limitations
- Windows Phone 8 : Scheduled Tasks - Updating Tiles Using a Scheduled Task Agent
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 5) - Editing an Existing To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 4) - Creating the To-Do Item Shell Tile, Saving a To-Do Item
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 3) - Debugging Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 2) - TodoService, TodoItemViewModel
- Windows Phone 8 : Scheduled Tasks - To-Do List Scheduled Task Sample (part 1) - TodoItem,TodoDataContext
- Windows Phone 8 : Scheduled Tasks - Using Scheduled Tasks
- Windows Phone 8 : Scheduled Tasks - Background Agent Types
- Windows Phone 8 : Windows Phone Toolkit Animated Page Transitions - Reusing the Transition Attached Properties
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro