Debugging Scheduled tasks “Last Result 0XE0434F4D”

Ran into a problem today with using a scheduled task which was not executing properly after changes being made to it’s batchjob. Ofcourse the Windows Task Scheduler doesn’t give a very good description on the error message so I found a nice article that uses the following code:

@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 ErrorLevel of c:\Tools\YourTask.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

Using this code to run the application produced very nice debugging results for us to work on a solution.

I found this code via http://forums.techarena.in/windows-server-help/419821.htm but it seems to be a rather common knowledge item.

2 comments:

  1. I see you don’t monetize your site, don’t waste your traffic, you can earn extra bucks every month because you’ve got hi quality content.
    If you want to know how to make extra money, search for:
    Ercannou’s essential tools best adsense alternative

  2. Hello, is anybody here interested in online working?
    It is simple survey filling. Even 10$ per survey (10 minutes of
    work). If you are interested, send me email to hansorloski[@]gmail.com

Leave a Reply

Your email address will not be published. Required fields are marked *