定时执行任务

定时执行任务函数,但是并不是绝对的精准执行

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/420456/892692/%E5%AE%9A%E6%97%B6%E6%89%A7%E8%A1%8C%E4%BB%BB%E5%8A%A1.js

Author
inDarkness
Version
1.0
Created
2021-01-20
Updated
2021-01-20
License
N/A

定时脚本,每次用调用函数带上调用周期即可回调 需要grant对应权限: GM_getValue GM_setValue

OnceScript.everyTSeconds(10, 'FLAG-随便写-WhatEver', callbackFunc);
OnceScript.everyTMinutes(3, 'FLAG-随便写-WhatEver', callbackFunc);
OnceScript.everyTHours(2.5, 'FLAG-随便写-WhatEver', callbackFunc);
OnceScript.everyTDay(1.5, 'FLAG-随便写-WhatEver', callbackFunc);
或者是
OnceScript.everyTMinutes(3, 'FLAG-随便写-WhatEver', function(){
...Your code here
})