每12小时安排一次PeriodicTask [英] PeriodicTask scheduled every 12 hour

查看:109
本文介绍了每12小时安排一次PeriodicTask的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我在应用程序中添加了Schedule Task服务,以便使用PeriodicTask每12小时下载一次内容.我的问题是仅当应用程序在调试模式下运行时才会发生OnInvoke方法.一旦我断开手机与PC的连接并停止我的程序 从调试不会发生OnInvoke方法.请帮帮我.

Hi All

I have added on Schedule Task service in my application for download content for every 12 hours using the PeriodicTask. My problem is OnInvoke method occur only when the application run on debug mode. Once i disconnect my mobile from PC and stop my program from debug the OnInvoke method is not occur. Please help me.

推荐答案

未连接到PC时,您的定期任务很可能崩溃.
您是否正在使用ScheduledActionService.LaunchForTest()启动它?
您是在任务结束时调用NotifyComplete()吗?
您的任务如何等待十二个小时?
It is possible your periodic task is crashing when not connected to the PC.
Are you using ScheduledActionService.LaunchForTest() to start it?
Are you calling NotifyComplete() at the end of your task?
How is your task waiting for twelve hours?


这篇关于每12小时安排一次PeriodicTask的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆