Hello All,

Sharing some notes on Background task.

  • Background task allow us to run our code when our app is not in foreground.
               
  • Starting with Windows 10, you no longer need to place an app on the lock screen in order to register background tasks.
  • Background tasks are limited to 30 seconds of wall-clock usage.
  • Respect Cost : Add BackgroundWorkCostValue in run() to get access on priority from system.
            
  • Querying cost can prevent cancellations and incomplete operations.
  • Handle System Cancellations: 
       
  • Use deferral for any asynchronous operations.
  • App can have more than one Background Task.
  • If get the permission then build and register task(add triggers, add system conditions, task.register())