ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

java-Quartz Scheduler(cron)可以在同一执行时间调度多个作业吗?

2019-10-29 09:29:01  阅读:408  来源: 互联网

标签:scheduled-tasks cron quartz-scheduler spring java


我打算使用Quartz cron调度程序来调度作业.我的调度模式可能需要多个作业(例如A,B,C)才能同时运行(例如,每10分钟,A和B都应并行运行).现在,我看石英的方式似乎限制了此功能.我使用Spring框架.

问题-使用Quartz Cron创建/实施的计划可以在同一执行时间运行多个作业吗?

谢谢!

解决方法:

是的,您可以在Quartzs scheduler thread pool上配置threadCount属性:

org.quartz.threadPool.threadCount

Can be any positive integer, although you should realize that only
numbers between 1 and 100 are very practical. This is the number of
threads that are available for concurrent execution of jobs.
If you
only have a few jobs that fire a few times a day, then 1 thread is
plenty! If you have tens of thousands of jobs, with many firing every
minute, then you probably want a thread count more like 50 or 100
(this highly depends on the nature of the work that your jobs perform,
and your systems resources!).

标签:scheduled-tasks,cron,quartz-scheduler,spring,java
来源: https://codeday.me/bug/20191029/1959105.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有