定时执行任务

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

Acest script nu ar trebui instalat direct. Aceasta este o bibliotecă pentru alte scripturi care este inclusă prin directiva meta a // @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

Autor
inDarkness
Versiune
1.0
Creat
20-01-2021
Actualizat
20-01-2021
Size
1,26 KB
Licență
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
})