Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How often does the Quartz Scheduler wakes up?

I'm using Quartz Scheduling, more specifically a cron trigger set to wake up at 10PM every day of the week.

Another group I interface with are asking how many times during the day will the scheduler wake up to check if it needs to run jobs. The 10PM job is the only one configured. I assume that it will only wake up at that time.

I looked at the documentation but didn't see anything. If someone knows where its mentionned in the docs I would love to know.

Thanks.

like image 415
user198509 Avatar asked Feb 28 '23 01:02

user198509


1 Answers

From the configuration docs:

org.quartz.scheduler.idleWaitTime

Is the amount of time in milliseconds that the scheduler will wait before re-queries for available triggers when the scheduler is otherwise idle. Normally you should not have to 'tune' this parameter, unless you're using XA transactions, and are having problems with delayed firings of triggers that should fire immediately.

It defaults to every 30 seconds until it finds a trigger. Once it finds any triggers, it gets the time of the next trigger to fire and stops checking until then, unless a trigger changes.

So if you've got a single once-a-day trigger that never changes, it wakes up once a day to check.

We use Oracle to store our jobs and triggers and with a few hundred triggers we have negligible database traffic.

like image 84
Terry Wilcox Avatar answered Apr 27 '23 22:04

Terry Wilcox