ScheduledTask::LastExitReason Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the reason that the agent exited the last time it was run.
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
An agent should always call NotifyComplete when it has completed its intended task. If an agent runs successfully and calls NotifyComplete, its LastExitReason property will have the value Completed.
If an agent is unable to complete its intended task, it should call Abort. If this method is called by the agent, the LastExitReason will be Aborted and the IsScheduled property for the associated ScheduledTask will be set to false. The agent will not be run again until it is rescheduled by the foreground application.