none
[UWP]The UWP app is not starting from scheduled task when "Run whether user is logged on or not" option is selected. RRS feed

  • Question

  • We have developed an UWP app that we are able to run from scheduled task ONLY when the "Run only when the user is logged on" option is selected. But, the app is not starting when "Run whether user is logged on or not" option is selected i.e in session 0 or non-interactive session. Is UWP app not capable to run in session 0 or non-interactive session? Is there any workaround to overcome this problem?



    Tuesday, May 30, 2017 5:26 AM

All replies

  • Hi Rajkumar Mandal,

    As we know, the task scheduler is used to automatically perform routine tasks. It can start an application such as exec action, E-mail action, show message action when the criteria is met which you set early. But an application which can be started by an exec action is usually a desktop application and the best way to launch UWP apps is by uri. So do you mind to share me about how to use the task scheduler to start the UWP app after which I can try to reproduce the issue and figure it out?

    Best Regards,

    Xavier Eoro


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 31, 2017 9:29 AM
  • @Rajkumar Mandal

    Any update on this question?

    If you have any other concern regarding this issue, please feel free to let me know.

    Best Regards,

    Xavier


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 2, 2017 2:46 AM
  • Hi Xavier,

    We are invoking our converted UWP app from task scheduler using protocol like 'myuwp://'. The app successfully launches from the scheduled task only when "Run only when user is logged on" option is selected i.e. from the same user session. But, if we select the option "Run whether user is logged on or not" from the task scheduler, the UWP app fails to launch because this option of task scheduler runs the UWP app in session 0 instead of user session. So, UWP app is not able to run in non-interactive session from the task scheduler. Is it a limitation of UWP app?

    Regards,

    Rajkumar

    Sunday, June 4, 2017 5:38 PM
  • Hi Rajkumar Mandal,

    >>” if we select the option "Run whether user is logged on or not" from the task scheduler, the UWP app fails to launch”

    Thanks for your information.

    According to your reply, this issue was more related to task scheduler, it’s not a UWP development issue. As a result, it’s out of the scope for this forum.

    About “task scheduler” questions, it should be technet issue, you could post a new thread on here: https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winservergen 

    Best Regards,

    Xavier Eoro


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 5, 2017 8:57 AM
  • Hi Xavier Eoro,

    We can successfully invoke a win32 application from the task scheduler by selecting either of the options. We never face any problem. In case of converted UWP app we are facing this weird issue. We just wanted to know whether UWP app is capable to run in session 0 or non-interactive session i.e. "Run whether user is logged on or not" option is selected in task scheduler. If the UWP app is capable to run in this scenario how can we implement that?

    Thanks,

    Rajkumar


    Monday, June 5, 2017 11:39 AM
  • Hi Rajkumar Mandal,

    Running code in session 0 is not supported for UWP / Desktop Bridge apps.

    What is this app’s scenario?

    Best Regards,

    Xavier Eoro


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 6, 2017 5:18 AM