java-Quartz Scheduler(cron)可以在同一执行时间调度多个作业吗?
作者:互联网
我打算使用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