本文介绍了铬扩展,每x分钟执行一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望我的后台页面(或其中的一部分)每5分钟执行一次,以获取一些数据并显示桌面通知,如果any.How我能做到这一点。
解决方案
要完成,这将是一个方法:
$ b $
setInterval(your_function,5 * 60 * 1000)
每5分钟执行 your_function
(5 * 60 * 1000毫秒= 5分钟)
I'm just making a simple chrome extension.
I want my background page(or part of ) to execute every 5 minutes, to get some data and display a desktop notification if any.How can I do this
解决方案
One way to accomplish this would be:
setInterval(your_function, 5 * 60 * 1000)
Which would execute your_function
every 5 minutes (5 * 60 * 1000 milliseconds = 5 minutes)
这篇关于铬扩展,每x分钟执行一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!