2012-11-22 104 views

回答

7

這是不可能的。每30分鐘是最低的間隔。

1

如果你不放開市場上的代碼,你可以做this ....

DateTime lastrun; 
IsolatedStorageSettings.ApplicationSettings.TryGetValue<DateTime>("lastrun", out lastrun); 

if (DateTime.Now.Subtract(lastrun).TotalMinutes < 60) // 60 minutes, so run every hour 
{ 
    System.Diagnostics.Debug.WriteLine("Too soon, stopping."); 
    NotifyComplete(); 
    return; 
} 

//add proper code for removing old value, etc. 

IsolatedStorageSettings.ApplicationSettings.Add("lastrun", DateTime.Now); 

// Launch the task in 6 minutes 
ScheduledActionService.LaunchForTest("task", TimeSpan.FromMinutes(6));