AgentExitReason Enumeration

July 28, 2014

Lists the possible reasons for which a background agent exits. Use the LastExitReason property of the ScheduledTask class to determine why the task exited its most recent execution.

Namespace:  Microsoft.Phone.Scheduler
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

public enum AgentExitReason
<object property="enumerationValue" .../>

Member nameDescription
NoneThe agent has never been executed.
CompletedThe agent exited by calling NotifyComplete. An agent should always call this method when it has completed its intended task.
AbortedThe agent exited by calling the Abort method. After this method is called, the IsScheduled property will be set to false and the agent will not be run again unless the foreground application reschedules it.
MemoryQuotaExceededThe agent was terminated by the system because it exceeded the memory cap for background agents.
ExecutionTimeExceededThe agent was terminated by the system because the allotted time for execution has been exceeded.
UnhandledExceptionThe agent was terminated because an unhandled exception occurred.
TerminatedThe agent was terminated by the system due to the state of the device or operating system.
OtherAn internal system error caused the agent to be terminated.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2014 Microsoft