ScheduledTask.LastExitReason Property

July 28, 2014

Gets the reason that the agent exited the last time it was run.

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

public AgentExitReason LastExitReason { get; internal set; }

Property Value

Type: Microsoft.Phone.Scheduler.AgentExitReason
The reason the agent exited.

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2014 Microsoft