在WP 8.1中注册后立即启动后台任务 [英] Start Background task immediately after registering it in WP 8.1

查看:53
本文介绍了在WP 8.1中注册后立即启动后台任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何运行背景注册后立即完成任务?发现后台任务在每15分钟间隔运行
但是在注册后启动后台任务所需的确切时间是什么?



Kishor Bikram Oli

How can I run the background task immediately after registering it? It is found that background task runs in every 15 minutes interval but what is the exact time it takes to start background task after registering it?


Kishor Bikram Oli

推荐答案

Hello Kishor Bikram Oli,

 

欢迎
到开发通用Windows应用论坛!
 

Welcome to the Developing Universal Windows apps forum! 

< span style ="font-size:medium">请阅读粘性帖子,尤其是  引导
发布:主题行标签

我们需要知道您是Windows Phone 8.1 Silverlight还是Windows Phone 8.1应用程序。

backgroundtask与注册时的触发器相关。所以如果你想在特定时间触发它,请尝试参考:

如何在计时器上运行后台任务span style ="color:#0563c1; font-size:medium">如何在
计时器上运行后台任务

所以你会看到这个" 如果
oneshot 设置为true,第一个参数( FreshnessTime
指定在安排后台任务之前等待的分钟数
"

So you will see this "If oneshotis set to true, the first parameter (FreshnessTime) specifies the number of minutes to wait before scheduling the background task"

因此,借助此触发器,您可以将时间设置为零并触发你的任务。

 

最好的问候,

巴里


这篇关于在WP 8.1中注册后立即启动后台任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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