Last week I explained how to set up an automated way to shutdown your computer. The automation is performed using a built-in tool of Windows(r) called “Scheduled Tasks”. You could automate any job, task, or program execution using the example as a base.

This week I’m going to cover some basics of trouble-shooting your “Scheduled Tasks” in order to make sure they’re running properly and what to do if they aren’t running as you have defined them to.

First of all I’m using an article by Microsoft(r) as a base for my discussion. You can find that article at http://support.microsoft.com/kb/308558/en-us if you’d like to read what they have to say about it.

If you followed last week’s article but it didn’t work for you, follow the steps below to help determine what went wrong.

Go to Start->All Programs->Accessories->System Tools->Scheduled Tasks and click open “Scheduled Tasks”

Maximize the window if it isn’t by default

Go to the “View” menu and select View->Details

Now you should have “Name”, “Schedule”, “Next Run Time”, “Last run Time”, “Status”, “Last Result”, and “Creator” columns displayed at the top of the page.

Take a look at the contents of these columns particularly the “Last Run Time” column. This will tell you the last time the command was ran. Also look at the column “Last Result”. This column display a code detailing the result of the last run. If is displays anything other than 0x0 then it did not run successfully. The possible result codes that will be displayed here are:

  • 0x0 - The operation completed successfully.

  • 0x1 - An incorrect function was called or an unknown function was called.

  • 0x2 - The environment is incorrect.

The “Status” column also display the current or previous status of the scheduled task. The possible messages displayed here are:

  • 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.

If you see anything other than 0x0 displayed in “Last Result” and Blank or Running displayed in “Status” then something has gone wrong. Here are some things to check.

First, check that the “Scheduled Task” is enabled. Do this by Right-clicking the “Scheduled Task” and open it’s “Properties”. On the “Tasks” tab make sure the check box at the bottom “Enabled (scheduled tasks runs at specified time)” is checked.

Second, check to make sure that the “Scheduled Tasks” service is running. A service are programs that run in the background and dutifully do their job. To check this go to Start->Control Panel->Administrative Tools->Services. Locate “Task Scheduler” in that list of services. Right-click it and click “Properties”. This will display information about the “Task Scheduler” service. On the “General” tab make sure that “Startup type:” is set to “Automatic”. Check that the “Service Status:” states that it is “Started” if it isn’t click the “Start” button. Once all this checks out click “Ok” to close the properties for “Task Scheduler”. Now close the “Services” window.

Third, you can view the log file that “Scheduled Tasks” creates by opening the file located at c:\windows\SchedLgU.txt. This file just shows the status of each scheduled command and when it was last run.

One thing I have noticed with my laptop is that is it is in standby mode then the scheduled task will not run at all. So no error information will be displayed in the “Properties” for that task, nor will the log file show anything. In fact if you examine the log, you will not see any attempts to run that task on those dates and times while it was in standby mode. So if everything has checked out, you didn’t see any error messages and the “Last Result” displays 0x0, then it’s possible that your computer is going in standby or to sleep at which time it doesn’t even run the commands. Like always I hope this helps, and please drop me a line sometime and let me know that this article has been useful to you.