Question Locked

How do log failed scheduled task in Event viewer in Windows 2003

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Dear Team,

Please help me to log failed scheduled task in Event viewer Windows 2003

thanks

Makrand

8 replies

by seanferd

Open the scheduler, and look under the Advanced menu item. There is a log, and you can set it to notify you as well.

Do you get any errors while creating the task?

by makrand_n123

Thanks for initial help
where misssed task will get stored or can we see that Event viewer

by seanferd

I don't think you can get it to show in event viewer, unless it shows as an audit failure.

In application log, it will show that the scheduler has started, but I don't think you'll get a failure entry for the application the scheduler is supposed to start.

Scheduled Tasks > Advanced > Show log
Lists specific failure codes & reasons

by scott_heath

Are you running your own script or an executable that generates an exit code? Run it via a batch file and use %errorlevel% to check for a failure and use eventcreate.exe to make your own event log entry.

Regards,
Scott

http://scottisageek.spaces.live.com

by thommck

We had this issue on an old Windows 2000 server.
I fixed it by getting PowerShell (on a 2008 R2 server) to remotely read the log file for errors and email me the results daily.

Use this command to scan the log file for errors
Select-String "\* error" \\Server\winnt\SchedLgU.txt | |format-table LineNumber, line -AutoSize

or use this command to get the contents of the whole file
Get-Content \\Server\winnt\SchedLgU.txt

You can then add other things in the script to email results, create a marker file or whatever you need.
P.S. I had to share the Winnt directory before I could read the file remotely

by Wizard57M-TR

FOUR YEARS!!! That's how long it has been since this question was
asked and answered. Do you REALLY think anybody is going to keep
checking it after 4 years? Don't wake the dead, let them rest in peace.
Thank you,
wizard57m-cnet
TR Moderator

by thommck

If something comes up as the top result on a google search then it deserves to have an answer!
The internet doesn't have expiry dates, if it did this page would have been deleted

This discussion is closed to new replies.