Sangram Anand
Sangram Anand

Reputation: 10660

Asynchronous job scheduling in Quartz

Do java Quartz Scheduler support Asynchronous job scheduling.If so,is it by default or have to customize jobs to run asynchronously.

Upvotes: 4

Views: 5368

Answers (2)

Tomasz Nurkiewicz
Tomasz Nurkiewicz

Reputation: 341003

Not only it supports this behaviour but there is basically no other way. Once you schedule a job and a trigger (in any thread) this job will be executed asynchronously in a thread pool. You have some control over that thread pool like the number of threads.

Another issue is parallel execution of the same job. By default the same job can run in multiple threads started by different threads, unless the job is stateful.

Upvotes: 5

skaz
skaz

Reputation: 22640

Yes and it should be by default. I am using Quartz in my Grails application for my website and it spins off new threads for each job.

Upvotes: 1

Related Questions