简体   繁体   English

WP每5分钟执行一次周期任务

[英]WP Run periodictask every 5 minute

I've made an WP app, that checks in-game events of Guild Wars two. 我制作了WP应用程序,用于检查第二次激战的游戏内事件。 Looking up, MSDN states that the task will be run every 30 minute. 通过查找,MSDN指出该任务将每30分钟运行一次。 Thing is, at 30 minute, an event might already be over, is there away to make it run 5 minute, or an alternative? 事情已经发生了,在30分钟时,一个事件可能已经结束,是否有时间让它运行5分钟,还是其他方法?

All the task needs to do, it download some text from a webpage and display a notification if an event is due. 所有任务需要做,它从网页上下载一些文本,并在事件到期时显示通知。

Unfortunately, there's currently no way to make a periodic task run at shorter intervals. 不幸的是,当前没有办法使周期性任务以较短的间隔运行。

The only alternative is using the push notifications, but it means that you need to host a server somewhere (or use a cloud-based service, like AppHarbor ) to send the notifications. 唯一的选择是使用推送通知,但这意味着您需要在某个地方托管服务器(或使用基于云的服务,例如AppHarbor )来发送通知。

要比正常的后台任务计划更频繁地运行,您要么需要“在锁屏下运行”并自己处理,要么将工作负载卸载到可以为您创建推送通知的服务器上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM