Scheduled Tasks and background agents allow an application to execute code in the background, even when the application is not running in the foreground.
Background agents are divided into Periodic Tasks and Resource-intensive Tasks.
Periodic Task can run for no more than 25 seconds every 30 minutes. This sort of agent is suitable for many common use-cases:
(1) Downloading data from remote server and then scheduling notifications (for example, when monitoring
twitter or facebook updates)
(2) Changing lock screen wallpaper ( like the Bing app)
(3) Synchronizing data in the background, for example emails
Apps which require more device resources and/or which do not require a fixed update schedule, can use a resource intensive task.
Limitations
Background agents have certain limitations, as listed below.
(1)Background tasks can minimally be run every 30 minutes. There is a debug-only API to run them more
regularly, but this is not available for released apps.
(2) There are certain APIs which are not supported , you can check here.
(3) Some low power devices do not support background agents
(4) Background tasks are limited by number on each device and can be enabled or disabled from application settings.
(5) They do not work when power saver mode is activated.