locked
Background Tasks

Answers

All replies

  • It depends on what your lengthy operation is doing. You can run background tasks for a variety of goals, but some tasks (in particular ones which require heavy CPU usage) are incompatible with the goals of Metro style apps and need to be implemented as desktop apps.

    See Guidelines and checklist for background tasks, the Introduction to Background Tasks white paper, and the Windows 8 app developer blog Being productive in the background – background tasks

    --Rob

    • Marked as answer by ejcarp Thursday, June 28, 2012 4:53 PM
    Thursday, June 28, 2012 2:59 AM
    Owner
  • Thanks so much for the link. What I want  to do is very expensive and could take several minutes if not longer to complete. I guess this action is not appropriate to run in the background. I have one more quick question about running under the lock screen. I was looking here: Being productive in the background - background tasks and I cam across the section that described the CPU resource constraints for apps under the lock screen. Does that apply to the app running in the foreground when the screen is locked, or all apps running in the background when the screen is locked? For instance, if my app was running in the foreground and the user started this lengthy process and then locked the screen, would my process be allowed to complete or would it go into a suspended mode and only be allowed 2 CPU seconds every 15 minutes?

    Thanks so much for all of your help!

    Thursday, June 28, 2012 4:50 PM