Win8 metro TimeTrigger RRS feed

  • 问题

  •     As for "How to run a backgournd task on a timer" (, it mentions that when using TimeTrigger(FressnessTime, OneShot) the first parameter "FressnessTime" can be set 15 minutes or less. As I tried it like:

        builder.SetTrigger(new TimeTrigger(10, true));

       There is an exception : "Value does not fall within the expected range.".

       How can I invoke my background task directly by myself? thank you.


    2012年7月5日 2:38


  • No, you cannot set the time less than 15mins. Must be larger than 15mins. Based on this document: 


    The following sample code shows background task registration for a time trigger that fires in 15 minutes if the Internet is available. Note that the time trigger only accepts values greater than or equal to 15; smaller values fail during Register

    but why this above docuemtn you posted descibe it as "15mins or less", I will help to confirm it.

    ---->  How can I invoke my background task directly by myself?

    No, you cannot. Let system do it. Or you could think to choose other type triggers, and invoke it via change some statues of system, then system can invoke it directly. More information, please view the white page here.

    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us

    2012年7月5日 9:02