Greasy Fork is available in English.

定时执行任务

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

Tento skript by nemal byť nainštalovaný priamo. Je to knižnica pre ďalšie skripty, ktorú by mali používať cez meta príkaz // @require https://greasyfork.org/scripts/420456-%E5%AE%9A%E6%97%B6%E6%89%A7%E8%A1%8C%E4%BB%BB%E5%8A%A1/code/%E5%AE%9A%E6%97%B6%E6%89%A7%E8%A1%8C%E4%BB%BB%E5%8A%A1.js?version=892692

Autor
inDarkness
Verzia
1.0
Vytvorené
20.01.2021
Aktualizované
20.01.2021
Licencia
neuvedené

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

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
})