locked
How to run task immediately after reboot? RRS feed

  • Question

  • Hi,
    I use TimeTrigger to register IBackgrundTask, it runs every 15 minutes. The problem is when run the app user needs to wait 15 minutes even if it is the first time, I am asking how can I 
    Run the task immediately?
    When windows reboot, run the task immediately without waiting 15 minutes?
    Tuesday, December 18, 2012 10:52 AM

Answers

  • you can register the task which, once with the TimeTrigger and the other as SystemTrigger with as parameter : SessionConnected

    that one runs when the user logins


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Marked as answer by Bilal Sammour Sunday, December 23, 2012 7:35 AM
    Tuesday, December 18, 2012 6:51 PM

All replies

  • you can register the task which, once with the TimeTrigger and the other as SystemTrigger with as parameter : SessionConnected

    that one runs when the user logins


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Marked as answer by Bilal Sammour Sunday, December 23, 2012 7:35 AM
    Tuesday, December 18, 2012 6:51 PM
  • thank you Dave
    Sunday, December 23, 2012 7:36 AM
  • Hi Dave

           I am getting System.UnauthorizedAccessException when i am using Session Connected system trigger. Even I have declare the Background process in App manifiest with check system event 


    Ravindra


    Tuesday, February 19, 2013 6:54 AM
  • do you have lookscreen access with your app?

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Tuesday, February 19, 2013 12:27 PM
  • Above problem is resolved by adding lockscreen access to the app,

    but I have one more query that I want to trigger system event when User Login to OS for that I am using Session connected system trigger, Is it right way to do this,

    and If its right then the session connected will call as soon as user login or it will called after 15 minute.


    Ravindra

    Tuesday, February 19, 2013 1:55 PM