How to Confirm a Task Ran in Windows XP Scheduled Tasks - dummies

How to Confirm a Task Ran in Windows XP Scheduled Tasks

By Dan Gookin

Some tasks are like submarines: They’re running, but you can’t see them from shore. That’s because the task whizzes away in the background, doing its thing and not bothering you or otherwise being obvious. That’s okay for regular operations, but when you want to confirm that the task ran, it makes things difficult.

To confirm that the task has run, you need to check the task logs. Follow these steps:

  1. Open the Scheduled Tasks window.

    From the Start button menu, choose All Programs→Accessories→System Tools→Scheduled Tasks.

    The Scheduled Tasks window appears.


  2. Choose Advanced→View Log.

    The log file is loaded into the Notepad program. The text you see in the Notepad window reflects recent log activity, though the list isn’t sorted chronologically. You need to do some searching to find the most recent entries.

  3. Press Ctrl+F to summon the Find dialog box.

  4. In the Find What box, type most recent and click the Find Next button.

    You zoom to a line in the file that contains the following text:

    [ ***** Most recent entry above this line ***** ]
  5. Click the Cancel button to close the Find dialog box.

    The log file starts at the Most recent entry line and works its way up from there.

  6. Close the Notepad window when you’re done looking at the logs.

  7. (Optional) Close the Scheduled tasks window.

A typical task has two entries. For example, the Defrag task should show entries like this:

“defrag.job” (defrag.exe)
        Started 10/19/2009 9:44:01 AM
“defrag.job” (defrag.exe)
        Finished 10/19/2009 9:55:06 AM
        Result: the task completed with an exit code of (0).

The first entry (at the top) shows when the task was started. The next entry describes when the task has completed, as well as the results.

When a task screws up, you see something like this displayed:

“defrag.job” (defrag.exe)
        Started 10/12/2009 9:44:01 AM
“defrag.job” (defrag.exe)
        Finished 10/12/2009 9:44:01 AM
        Result: the task completed with an exit code of (2).

Your key to determining that the task screwed up is first knowing the task and checking the start and finish times. In this example, Defrag cannot run instantly: The start and finish times are the same. Sometimes, they’re just very close.

Also, the exit code 2 message usually isn’t a good sign. You’d have to look it up in your online documentation to see what it means, but it’s not good.

  • The Scheduled Tasks log file is named SchedLgU.txt, and it’s located in the Windows folder. It’s a plain text file.

  • An exit code is a value that all programs produce for the operating system when the program quits. It’s a way for programs that run automatically (such as those run by the Scheduled Tasks window) to communicate with the operating system.

  • Generally speaking, any exit code other than zero means that an error occurred.

  • Every time the Task Scheduler starts, you see an entry giving the starting time.

  • All tasks run. Whether the task was successful must be determined by examining the log.