Hello,
Welcome to Microsoft Q&A.
After consulting other engineers and doing a bunch of testing, here is conclusions:
How do <rescap:Capability Name="extendedExecutionUnconstrained"/> and <rescap:Capability Name="extendedBackgroundTaskTime"/> cooperate together with the modern standby?
If you add the above capabilities, the background task will run uninterrupted.
When the extended execution session is active and I press the power button on a device that supports modern standby what happens?
The background task will continue to run, since modern standby would only affect the foreground tasks and the timetrigger will continue uninterrupted since it is a process that is allowed to run while a machine is in standby.
When a TimeTrigger activates my background task and my app uses the extendedBackgroundTaskTime restricted capability, will the task just run indefinitely?
Yes, the task could run indefinitely. Note when the TimeTrigger is raised a second or a third time, a new task will be created and the currently existing task will still be running. If you don’t need multiple task running at the same time, remember to close old tasks.
Are TimeTriggers actually active in modern standby?
Yes, just as what I said above.
Both these answers are assuming that the machine is not on battery. If the machine enters battery saver mode, then the situation may change and these processes may be suspended.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.