We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
比如一个脚本, 后台每分钟运行一次, 第一次是2024-1-8 14:11:00运行, 运行时间可能远超1分钟, 这时候如果到2024-1-8 14:12:00, 会直接终止目前2024-1-8 14:11:00还在运行的脚本, 然后重新开始吗? 请问如何避免这种情况呢? 浏览器: Edge ScriptCat版本: 0.16.0 示例代码:
// ==UserScript== // @name New Userscript // @namespace https://bbs.tampermonkey.net.cn/ // @version 0.1.0 // @description try to take over the world! // @author You // @crontab * * * * * // ==/UserScript== return new Promise((resolve, reject) => { // Your code here... let count = 0; setInterval(function(){ ++count; if(count>65){ resolve(); }else{ console.log(count); } },1000) });
The text was updated successfully, but these errors were encountered:
会中断的
如果有这种脚本,我觉得是脚本的设计不合理,应该加入超时机制,或者延长间隔时间,或者使用GM_value来存储数据,下次调用使用value数据
Sorry, something went wrong.
No branches or pull requests
比如一个脚本, 后台每分钟运行一次, 第一次是2024-1-8 14:11:00运行, 运行时间可能远超1分钟, 这时候如果到2024-1-8 14:12:00, 会直接终止目前2024-1-8 14:11:00还在运行的脚本, 然后重新开始吗?
请问如何避免这种情况呢?
浏览器: Edge
ScriptCat版本: 0.16.0
示例代码:
The text was updated successfully, but these errors were encountered: