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
Please answer some questions before submitting your issue. Thanks!
2.4.1
cron表达式 0/1 * * * * ? 解析会死循环
循环代码:
public Date getNextInvalidTimeAfter(Date date) { long difference = 1000; // 省略部分代码 while (difference == 1000) { newDate = getTimeAfter(lastDate); if(newDate == null) break; difference = newDate.getTime() - lastDate.getTime(); // 该表达式difference一直是1000,导致while不退出 if (difference == 1000) { lastDate = newDate; } } return new Date(lastDate.getTime() + 1000); }
The text was updated successfully, but these errors were encountered:
另外 压测的时候发现自带的cron解析比较耗时。可以替换为spring的cron解析类 + cron LRU 缓存。 经过测试:
ps:LRU使用jdk自带LinkedHashMap,纯本地环境测试。
Sorry, something went wrong.
上面说错了,应该是xxlCron创建更耗时,所以数据量大的时候效率更差,加缓存提升更明显。我尝试修改缓存大小,发现缓存大小对xxlCron影响更大。
No branches or pull requests
Please answer some questions before submitting your issue. Thanks!
Which version of XXL-JOB do you using?
2.4.1
Expected behavior
Actual behavior
cron表达式 0/1 * * * * ? 解析会死循环
循环代码:
Steps to reproduce the behavior
Other information
The text was updated successfully, but these errors were encountered: