How can I enable the Windows Server Task Scheduler History recording?

173,497

Solution 1

Step 1: Open an elevated Task Scheduler (ie. right-click on the Task Scheduler icon and choose Run as administrator)

Step 2: In the Actions pane (right pane, not the actions tab), click Enable All Tasks History

That's it. Not sure why this isn't on by default, but it isn't.

Solution 2

I have another possible answer for those wondering why event log entries are not showing up in the History tab of Task Scheduler for certain tasks, even though All Task History is enabled, the events for those tasks are viewable in the Event Log, and all other tasks show history just fine. In my case, I had created 13 new tasks. For 5 of them, events showed fine under History, but for the other 8, the History tab was completely blank. I even verified these tasks were enabled for history individually (and logging events) using Mick Wood's post about using the Event Viewer.

Then it hit me. I suddenly realized what all 8 had in common that the other 5 did not. They all had an ampersand (&) character in the event name. I created them by exporting the first task I created, "Sync E to N", renaming the exported file name, editing the XML contents, and then importing the new task. Windows Explorer happily let me rename the task, for example, to "Sync C to N & T", and Task Scheduler happily let me import it. However, with that pesky "&" in the name, it could not retrieve its history from the event log. When I deleted the original event, renamed the xml file to "Sync C to N and T", and imported it, voila, there were all of the log entries in the History tab in Task Scheduler.

Solution 3

The adjustment in the Task Scheduler app actually just controls the enabled state of a certain event log, so you can equivalently adjust the Task Scheduler "history" mode via the Windows command line:

wevtutil set-log Microsoft-Windows-TaskScheduler/Operational /enabled:true

To check the current state:

wevtutil get-log Microsoft-Windows-TaskScheduler/Operational

For the keystroke-averse, here are the slightly abbreviated versions of the above:

wevtutil sl Microsoft-Windows-TaskScheduler/Operational /e:true
wevtutil gl Microsoft-Windows-TaskScheduler/Operational

Solution 4

I think the confusion is that on my server I had to right click the Task Scheduler Library on left hand side and right click to get the option to enable or disable all tasks history.

Hope this helps

Solution 5

Here is where I found it on a Windows 2008R2 server. Elevated Task Scheduler Click on "Task Scheduler Library" It appears as an option on the right hand "Actions" panel.

enter image description here

Share:
173,497

Related videos on Youtube

martti d
Author by

martti d

Web Programmer

Updated on July 08, 2022

Comments

  • martti d
    martti d almost 2 years

    I have a Windows Server 2008 with scheduled tasks running, mainly .bat files calling PHP files. I have 2 users on the server, one Admin and the other is a Standard user.

    I used the Standard User to clear the history log in the Task Scheduler History tab using the Event Viewer. Now it won't record any history anymore. All of the scheduled tasks no longer have history in the History tab. However, the Last Run Result returns 0x0 and the schedulers are working fine.
    Please advise.

  • Orr
    Orr about 10 years
    that's the right answer for windows server 2012 at least in my case
  • Logman
    Logman about 10 years
    I have Windows Server 2008 Standard, and there is no "Actions pane, click Enable All Tasks History". There are no histories for any running task, even MS scheduled system tasks.
  • billvsd
    billvsd almost 10 years
    Open Task Scheduler. In the left pane, right click Task Scheduler (Local), then click Enable All Task History.
  • Jeff
    Jeff about 8 years
    I have the same problem--some tasks with history, some without. However the & character doesn't seem to be the problem.... Solution: Searched the actual event log and it appears that the event log is purged after a certain number of records. The history I was looking for is already purged.
  • maxhugen
    maxhugen about 8 years
    My History was recently 'disabled' - not by me - maybe by a Win 10 update? Of course I only found out when I actually wanted to see the History for a Task. :(
  • Doug_Ivison
    Doug_Ivison almost 8 years
    Though my problem was an "&" in the job name (Jeremy's answer), yours got +1 too, for giving specific navigation in EventVwr, so we could see the PRIOR history.
  • HerrimanCoder
    HerrimanCoder almost 8 years
    Brian Clark: Could you please update your answer as per billvsd's comment? On Windows 2008 Enable All Tasks History is not in the Actions pane, but rather you have to right-click in the top-left Task Scheduler node, and it's in the context menu under that.
  • user208145
    user208145 over 7 years
    This is quite possibly one of the easiest fixes, and I don't know why it's disabled by default.
  • armen
    armen almost 7 years
    very useful info. one question: is there any overhead on the system after enabling all tasks history ?
  • Carl Walsh
    Carl Walsh about 6 years
    There doesn't seem to be a way to enable history on one task, just a global flag. As Jeremy's answer points out, the history is a view over the Windows Event Log, so history is all-or-nothing.
  • Jon Grah
    Jon Grah almost 6 years
    Can you comment on the retention: false and autoBackup: false and publishing: lines? I don't see any explanation for these lines. Perhaps you can add to your answer what each of the lines of the current state mean.
  • Glenn Slayden
    Glenn Slayden almost 6 years
    @JonGrah Sorry, no idea what you're talking about. The words you've mentioned don't appear in my answer.
  • Jon Grah
    Jon Grah almost 6 years
    I apologize. I should have included a screenshot: screencast.com/t/FY6u6v2A . Hope that clarifies what I am asking about retention: false and autoBackup: false and publishing: lines?
  • Glenn Slayden
    Glenn Slayden almost 6 years
    @JonGrah Ok thanks for the clarification. I haven't noticed that before. Hopefully some else will chime in--or you could post a new question...
  • Marianna S.
    Marianna S. over 5 years
    In Windows Server 2016 if the Actions Pane is not visible, click on the "Show/Hide Action Pane" button under the menu bar in the top left corner.
  • Luuk
    Luuk about 5 years
    The 'retention' and 'autobackup' are related to the eventvwr, and what eventvwr does do with the logs. (i.e. EVENTVWR.EXE /l:%SystemRoot%\System32\Winevt\Logs\Microsoft-Windows-TaskS‌​cheduler%4Operationa‌​l.evtx )
  • ryansin
    ryansin about 4 years
    Cheers Jeremy you've saved me a lot of anguish
  • Shashwat Kumar
    Shashwat Kumar about 3 years
    What is operational here?