简体   繁体   English

UWP后台任务计时器

[英]UWP Background task timers

I am working on an app that needs a timer to fire at a specified time in the background. 我正在开发一个需要计时器在后台指定时间触发的应用程序。 I then want to start a timer that ticks every 10 minutes or so till a specified time. 然后,我想启动一个计时器,该计时器每10分钟左右计时一次,直到指定的时间。 In all this I do not want the user to have to open the app. 在所有这些方面,我都不希望用户必须打开该应用程序。 What is the best way to achieve this? 实现此目标的最佳方法是什么? I have looked around and haven't found a good, straight forward, answer. 我环顾四周,没有找到一个很好的,直接的答案。

Thanks! 谢谢!

I then want to start a timer that ticks every 10 minutes or so till a specified time. 然后,我想启动一个计时器,该计时器每10分钟左右计时一次,直到指定的时间。

Windows has a built-in timer that runs background tasks in 15-minute intervals. Windows具有内置的计时器,该计时器每隔15分钟运行一次后台任务。 You can create a timer trigger to start the background process in a specific interval. 您可以创建计时器触发器,以特定时间间隔启动后台进程。

For details, please check the document Run a background task on a timer . 有关详细信息,请检查文档“在计时器上运行后台任务”

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

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