Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scheduled Task will not run returns e0434f4d as last result

I have a simple vb.net application. When I go to bin\debug\program.exe and double click the program runs perfect. The same program will not execute using task scheduler. When I create a scheduled task and click 'run' it just pops up a console window for a second, closes. Additionally, this same program used to run with task scheduler. One day, it just stopped working.

ps:
I have this program code managed in svn so I can safely say that the code has not changed.

like image 686
Doug Chamberlain Avatar asked Jan 10 '11 15:01

Doug Chamberlain


2 Answers

The 0xe0434f4d exit code is quite meaningful. That's the native exception code for a managed exception. In other words, your app is crashing with an unhandled exception when it is run by task manager. I could guess at reasons why, but it is fairly pointless. Find out yourself, write an event handler for AppDomain.CurrentDomain.UnhandledException and log the value of e.ExceptionObject.ToString(). That gives you the exception message and the stack trace, almost always good enough to find out why it is bombing.

like image 148
Hans Passant Avatar answered Nov 15 '22 07:11

Hans Passant


Personally I don't believe in magic :-)

  1. Double-check that the source code is not modified comparing to the working version.
  2. Are you sure that the program is executed at all? Might be some permissions-related issues (from which user does the program execute and so on).
  3. (if #2 passes) Try debugging it to see what causes the problem.
like image 22
volpav Avatar answered Nov 15 '22 08:11

volpav