jjzjj

ScheduledActionService

全部标签

c# - Windows 8 Phone 周期性任务未运行

我通过以下文档创建了一个后台周期性任务:http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202941(v=vs.105).aspx出于某种原因,我从未见过它运行。(从某种意义上说,SchedulerTaskAgent.cs类中的OnInvoke()方法从未被调用过)打开调试器后,我可以使用以下方法调用该方法:if(DEBUG_AGENT)ScheduledActionService.LaunchForTest(periodicTaskName,TimeSpan.FromSeconds(60));#endif它