Event ID for Scheduled Task Failure in Windows Server 2003

scheduled-taskwindows-event-logwindows-server-2003

If a scheduled task fails on Windows Server 2003, is anything written to the event log? And if so, what Event ID does it have so I can set an Event Trigger to look for it, and email me?

Best Answer

No, Scheduled Tasks in Server 2003 do not make use of the Event Log. They log to a text file, SchedLgU.txt under \Windows\Tasks\. The simplest way I've found to generate emails based on that log is with PowerShell.

Select-String "\* error" should be able to find any failures in the log, and after that, it's just a matter of triggering an email when that's found... and ironically, yes, it's probably easiest to run your script to scan for Scheduled Tasks failures as a Scheduled Task.