Microsoft KB Archive/308558

= How to troubleshoot scheduled tasks in Windows XP and in Windows Server 2003 =

Article ID: 308558

Article Last Modified on 10/11/2007

-

APPLIES TO


 * Microsoft Windows XP Professional
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition
 * Microsoft Windows Server 2003, Standard x64 Edition
 * Microsoft Windows Server 2003, Enterprise x64 Edition

-



This article was previously published under Q308558





In This Task
SUMMARY
 * Checking the Task Status
 * Checking the Scheduled Tasks Log
 * Checking the Task Scheduler Service



SUMMARY
This step-by-step article describes how to troubleshoot scheduled tasks in Windows XP and in Windows Server 2003. If scheduled tasks do not run, you can use several methods to determine the source of the problem.

Note Administrators or users with administrator permissions can configure the Task Scheduler to send a notification when a scheduled task does not run as you set it to run. To do so, click Notify Me of Missed Tasks on the Advanced menu.

back to the top

Checking the Task Status
Periodically check the status of scheduled tasks, because sometimes you may not be aware that a scheduled task did not run. Use the Detail view in the Scheduled Task window to see the following information about each task:
 * Schedule - The schedule for the task.
 * Next Run Time - The time and date that the task is next scheduled to run.
 * Last Run Time - The time and date the task was last run.
 * Status - The current status of the task.
 * Last Result - Code that indicates the result of the last run.

The Status column has the following status and description information:
 * Blank - The task is not running, or it ran and was successful.
 * Running - The task is currently running.
 * Missed - One or more attempts to run this task was missed.
 * Could not start - The most recent attempt to start the task did not work.

The Last Result column displays a completion code. You can obtain a full explanation of all Windows completion codes from MSDN, but the common codes for scheduled tasks are:
 * 0x0: The operation completed successfully.
 * 0x1: An incorrect function was called or an unknown function was called.
 * 0xa: The environment is incorrect.

If the result code has the &quot;C0000XXX&quot; format, the task did not complete successfully (the &quot;C&quot; indicates an error condition). The most common &quot;C&quot; error code is &quot;0xC000013A: The application terminated as a result of a CTRL+C&quot;.

Also check the following data in the task's properties:
 * Make sure the check box that turns on the task has a check mark.
 * Check the path to the program and make sure that it is correct. Also check the program to see if it requires some command-line parameters that are missing.

For a full explanation of Windows completion codes, visit the following Web site:

http://msdn2.microsoft.com/en-us/library/aa364454.aspx

back to the top

Checking the Scheduled Tasks Log
Scheduled tasks maintains a log file (Schedlgu.txt), in the c:\Windows folder. You can view the log from the Scheduled Tasks window by clicking View Log on the Advanced menu.

The log file size is 32 kilobytes (KB), and when the file reaches its maximum size, it automatically starts to record new information at the beginning of the log file and writes over the old log file information.

back to the top

Checking the Task Scheduler Service
The Task Scheduler service must be running and properly configured to run tasks. If you had stopped scheduled tasks manually from the Scheduled Tasks window, the service stops and does not initialize the next time you start the computer. If the service is not configured to log on as the local system account, it may not start.

To check the settings for the service:
 * 1) Click Start, click Control Panel, and then double-click Administrative Tools.
 * 2) Click Computer Management.
 * 3) Expand Services and Applications, and then click Services.
 * 4) Right-click the Task Scheduler service, and then click Properties.
 * 5) On the General tab, make sure that the startup type is set to automatic, and that the service status is Started. If the service is not running, click Start.
 * 6) On the Log On tab, make sure that the local system account is selected, and that the Allow service to interact with desktop check box has a check mark.
 * 7) Click OK, and then quit Computer Management.

back to the top

Keywords: kbhowtomaster kbtshoot kbenv KB308558

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.