Question

Locked

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

By makrand_n123 ·
Dear Team,

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

thanks

Makrand

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Task scheduler should have its own log

by seanferd In reply to How do log failed schedul ...

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?

Collapse -

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

by makrand_n123 In reply to Task scheduler should hav ...

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

Collapse -

Yes, the missed task will be in the scheduler log

by seanferd In reply to How do log failed schedul ...

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

Collapse -

What kind of task?

by scott_heath In reply to How do log failed schedul ...

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

Collapse -

Use Powershell

by thommck In reply to How do log failed schedul ...

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

Collapse -

Reponse To Answer

by wizard57m-cnet Moderator In reply to Use Powershell

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

Collapse -

Reponse To Answer

by thommck In reply to Use Powershell

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

Back to Software Forum
8 total posts (Page 1 of 1)  

Software Forums