Why does scheduled task fail?

B

Brett

I have a scheduled .bat file that keeps failing. Is there a log I can
view for the reason why it fails? I tried event viewer but there
wasn't anything that seemed like a log for this. In event viewer, I
have entries for system log but not for Application and Security.
After viewing Application and Security, once I click back to System,
it is also empty.

Thanks,
Brett
 
P

Pegasus \(MVP\)

Brett said:
I have a scheduled .bat file that keeps failing. Is there a log I can
view for the reason why it fails? I tried event viewer but there
wasn't anything that seemed like a log for this. In event viewer, I
have entries for system log but not for Application and Security.
After viewing Application and Security, once I click back to System,
it is also empty.

Thanks,
Brett

There is a log file under the Advanced pull-down menu in
the Task Scheduler.

You should also run your own:

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
c:\Tools\YourTask.exe 1>>c:\test.log 2>>c:\test.err
echo %date% %time% End of task >> c:\test.log

Schedule this batch file, then examine the two log files
and all will become clear.
 
D

Dave Patrick

And for the other issue. The temporary fix;
You might try changing the file properties to "Overwrite as needed"

Then; Control Panel|Administrative Tools|Services|Event Log Service|General,
set the "Startup Type:" to "Disabled" restart the pc, then delete (or move)
the corrupt *.evt file(s) from %windir%\system32\config then set the Event
Log Service "Startup Type:" back to "Automatic", restart for effect.

The more permanent fix;
http://support.microsoft.com/default.aspx?scid=kb;en-us;829246&Product=win2000

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|I have a scheduled .bat file that keeps failing. Is there a log I can
| view for the reason why it fails? I tried event viewer but there
| wasn't anything that seemed like a log for this. In event viewer, I
| have entries for system log but not for Application and Security.
| After viewing Application and Security, once I click back to System,
| it is also empty.
|
| Thanks,
| Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top