0

The task scheduler below clearly errors but it never shows up under the task scheduler operational view as being failed but completed successfully. I want to send an email on a failed task scheduler to myself. I could do this on my old box not this Windows 2012 R2 Server box.

Application: Tournaments.NotificationProcessor.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException Stack: at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ReadNextElement(System.Data.Entity.Core.Common.Internal.Materialization.Shaper) at System.Data.Entity.Core.Common.Internal.Materialization.Shaper1+SimpleEnumerator[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext() at System.Linq.Enumerable.FirstOrDefault[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] at Tournaments.Data.Repositories.Games.GamesRepository.GetGame(Int32, System.Nullable1) at Tournaments.NotificationProcessor.Program.Main(System.String[])

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
Mike Flynn
  • 244
  • 1
  • 4
  • 13
  • `Application: Tournaments.NotificationProcessor.exe [...] at Tournaments.Data.Repositories.Games.GamesRepository.GetGame(Int32, System.Nullable1) at Tournaments.NotificationProcessor.Program.Main(System.String[])` You know, for some reason, I suspect this has more to do with a gaming server than a professional systems administration type-of-thing. – HopelessN00b Nov 20 '14 at 16:30
  • I dont get what you are saying – Mike Flynn Nov 20 '14 at 16:50

1 Answers1

1

There's a difference between the task failing to run and the task itself having an error within the task. The task scheduler just runs the task, it doesn't monitor errors within the task, only if it can run it and close the task properly. So the errors you are receiving within your Tournaments.NotificationProcessor.exe application have to notify you within that app itself...the task scheduler won't know that these errors occurred.

TheCleaner
  • 32,627
  • 26
  • 132
  • 191
  • Before I upgraded my server to server 2012 it did do this. It would notify mean of any .NET exceptions because the task did not finish. – Mike Flynn Sep 25 '15 at 01:25