14

On Windows 7, is there a way to see a log of scheduled tasks?

3 Answers 3

9

The Scheduled Tasks itself provide detailed information on when a task will run and when it ran.

The Event Logs might inform you with warnings and errors when somenthing goes wrong,
you can see those in the Event Viewer.

The log of the Scheduled Tasks can also be read in the following location:

C:\Windows\Tasks\SchedLgU.txt

This file would contain the same detailed information as said before but you can go back in time, please note that this does not show warnings and errors with detailed information as those go to the event log.

4
  • this seems to have changed on windows 8 :(
    – JonnyRaa
    Mar 2, 2015 at 9:27
  • 2
    @JonnyLeeds: Might have moved to the event logs; see Microsoft-Windows-TaskScheduler, which seems to contain some information on it. Furthermore, please note that in the task scheduler itself there is a history tab (which only works after enabling history for the tasks). Mar 2, 2015 at 18:11
  • I can't see anything in the event log (that was the first place I looked) however the task history is extremely useful! Cheers
    – JonnyRaa
    Mar 3, 2015 at 9:53
  • That SchedLgU.txt is not a very informative log. I don't think it logs the tasks so much as the start of the task scheduler itself, right?
    – Hack-R
    Jan 28, 2019 at 18:49
1

The issue with the SchedLgU.txt file is that it is always open and most editors will not display it at all. Using the type command will work but only if the task I want to view has not rolled off the screen (even increasing the Buffer size on the cmd.exe properties may not be enough). I get around the issue with a ( type SchedLgU.txt > Schtask.txt ) followed by a ( Notepad schtask.txt ). Then a quick search for the " Most recent entry is above this line" and my task is generally right there. This can be used in a batch file and if you have the permissions can be run against remote computers.

-------------------- Sample batch file --------------------

schtasks /RUN /S \\servernamehere /TN "TaskNameHereInsideQuotes"

pause 

type \\servernamehere\c$\windows\tasks\schedlgu.txt > schtask.txt

notepad schtask.txt

Just pause long enough for the task to finish. Another thing I do is to put the average run time in the description area of the scheduled task. Hope this helps.

1

Sorry I can't speak to Windows 7, but on Windows XP: Start → Settings → Control Panel, then right-click on Scheduled Tasks and select Open. In the menu for the Scheduled Tasks list that appears, select Advanced → View log. The file it opens is C:\WINDOWS\SchedLgU.txt. On Windows XP, that file contains Unicode text, so not every editor will show it properly - but Notepad works fine.

There should be something similar in Win7.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .