ResourceIntensiveTask.ExpirationTime Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the time at which the task’s schedule expires.

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

Syntax

Public Overrides Property ExpirationTime As DateTime
public override DateTime ExpirationTime { get; set; }

Property Value

Type: System..::.DateTime
DateTimeThe time at which the task’s schedule expires.

Remarks

This date must be sometime after the current time, but must be 14 days or less from the current date. The default value is 14 days from the current date. Applications that use resource intensive tasks must renew their schedule at least once every two weeks by calling Remove(String) and then Add(ScheduledAction) to add the task when the main application is running in the foreground. This helps to ensure that unused applications are not draining device resources.

Some applications may have resource intensive agents for which the schedule does not expire as long as certain requirements are met. For more information, see Background agents for Windows Phone 8.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0

See Also

Reference

ResourceIntensiveTask Class

Microsoft.Phone.Scheduler Namespace