Quartz event scheduler accuracy issue

I am using QuartzEventScheduler to scheduler an event to be fired in 5 seconds. However from what I am seeing, it fires around 30 seconds or so. This is way off. Is there something that I need to tune by setting some quartz properties? Or axon is doing something messing up the accuracy? Thanks.

It’s Quartz, which has a minimum scheduling interval. In my opinion Quartz is lousy for fine-grained event scheduling, especially if you’re scheduling and canceling a large quantity of events. We ended up writing our own custom implementation of the Axon EventScheduler interface that’s much less heavyweight and uses a Java ScheduledExecutorService (backed by a single Postgres table) to do the event publication. Quartz is a big complex piece of software and you pay a price for its flexibility even though EventScheduler only needs a small part of its feature set.