Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you specifically want to run a custom action at 1 am, i'm not sure that a single boolean would be enough to make it work.</p> <p>I guess that you plan to reset your boolean at 1:31 to prepare the execution of the next day, but what if your periodic task is also called at 1h51 (so called more than 2 times between 1am and 2am). How could this happen? Well maybe this could happen if the device is reboot but i'm not quiet sure about it. In any case, storing the last execution datetime somewhere and comparing it to the current one can be a safer way to ensure that your action is only invoked once per day.</p> <p>One question remains : Where to store your boolean or datetime (depending which one you'll pick)? AppSetting does not seem to be a recommanded place <a href="http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202944%28v=vs.105%29.aspx" rel="nofollow">according msdn</a> :</p> <blockquote> <p>Passing information between the foreground app and background agents can be challenging because it is not possible to predict if the agent and the app will run simultaneously. The following are recommended patterns for this.</p> <ol> <li>For Periodic and Resource-intensive Agents: Use LINQ 2 SQL or a file in isolated storage that is guarded with a Mutex. For one-direction communication where the foreground app writes and the agent only reads, we recommend using an isolated storage file with a Mutex. We recommend that you do not use IsolatedStorageSettings to communicate between processes because it is possible for the data to become corrupt.</li> </ol> </blockquote> <p>A simple file in isolated storage should get the job done.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload