Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
java Quartz Scheduler是否支持异步作业调度。如果是,是默认情况下还是必须自定义作业才能异步运行。
它不仅支持这种行为,而且基本上没有其他方法。一旦您安排了作业和触发器(在任何线程中),该作业将在线程池中异步执行。您可以对该线程池进行一些控制,例如线程数。
另一个问题是同一作业的并行执行。默认情况下,同一个作业可以在由不同线程启动的多个线程中运行,除非该作业是有状态的。
是的,它应该是默认的。我在我的 Grails 应用程序中为我的网站使用 Quartz,它为每个作业衍生出新线程。