Modern applications are very interactive since they collect data and load content with no user attention. Windows Phone applications that use background agent are able to execute code even if they are not running in the foreground.
An application can implement only one background agent, which could be one of two types:
PeriodicTask: This is used to specify tasks that run typically every 30 minutes and could be 25 seconds long. There is a periodic task limitation in the system for a maximum of six periodic agents per device. If our phone reaches this limit, adding a new task to the schedule causes
InvalidOperationExceptionto be thrown. It is usually used to get some updates, achieve synchronization, or calculate some data.