Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To configure Quartz in a web application, first match its version to your Java and servlet namespace, then choose an in-memory or JDBC-backed JobStore and configure how the scheduler starts and stops with the application. For Spring Boot, use the Quartz starter and Spring’s spring.quartz settings; for a plain servlet deployment, use Quartz’s listener or startup servlet. Use JDBC JobStore with a shared database for clustering, and do not run multiple non-clustered schedulers against the same Quartz tables.

Choose a Quartz version that matches your application

Quartz’s documentation index lists 2.4.x for Java 8 applications using javax.* and 2.5.x for Java 11 or later applications using jakarta.*. Check both the Java runtime and the namespace expected by your servlet container and dependencies before adding Quartz. A mismatch can cause dependency or deployment errors.

Quartz is configured through properties and/or its API. StdSchedulerFactory reads the configuration and creates the scheduler. The Quartz project’s configuration reference covers scheduler identity, thread pools, JobStores, data sources, listeners, plugins, and clustering.

Choose the right JobStore

The JobStore determines whether Quartz’s jobs and triggers are retained when the application process stops, and influences transaction ownership and deployment complexity.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
DROK Timer Relay - 5V/12V/24V Time Delay Relay Switch Delay-Off Cycle Timer 0.01s-9999mins with LCD Display Support Micro USB 5V Power Supply
  • Independent Parameters: OP/CL/LOP parameters can be modified and saved, and they are individual
  • Auto Save: All setting parameters are automatically saved by power-fail
  • LCD Display: the time delay relay module is designed with LCD display, can clearly and directly show the current mode and parameters
Option Persistence Transaction model Best fit
RAMJobStore In memory; scheduled state is not retained across process restarts. No relational-database transaction model. Ephemeral scheduling in a single process when losing scheduled state on restart is acceptable.
JobStoreTX Persists jobs, triggers, and calendars in relational tables. Quartz manages its own transactions. Applications using application-managed transactions that need persisted scheduling state.
JobStoreCMT Persists jobs, triggers, and calendars in relational tables. Uses container-managed or JTA transactions. Deployments that require container or JTA transaction coordination.

Quartz’s configuration reference describes JDBC JobStore as requiring a data source, an appropriate driver delegate, a table prefix and schema, and transaction settings suited to the database and application. Use SQL intended for the database vendor, or a controlled custom migration; do not assume one vendor’s schema script will work unchanged on another.

Configure Quartz in Spring Boot

Add spring-boot-starter-quartz to enable Spring Boot’s Quartz integration. When the starter is present, Boot auto-configures Quartz; its documented default is an in-memory JobStore. Set spring.quartz.job-store-type=jdbc to use a JDBC-backed JobStore.

Spring Boot exposes Quartz settings through spring.quartz, including additional Quartz properties under spring.quartz.properties.*. Its integration also supports schema initialization, custom Quartz data sources, and transaction managers. Consult the Spring reference for the settings supported by the Boot version used by your application.

Rank #2
[2 Pack] DC 6-30V Timer Relay Programmable Delay Relay Module Cycle Timer with LED Display / 5V Micro USB, Smart Home Controller
  • 【Multifunction Timer Relay】Programmable delay modes to control the relay timings, widely used at smart home, industrial control, automatic irrigation, indoor ventilation, protection equipment etc.
  • 【Load Range】Operating voltage: DC 6V - 30V, support micro USB 5V power supply. High level trigger: 3V - 24V. NO(Normally open) maximum load < AC 250V/10A, < DC 30V/10A. Timing range: 0.1s ~ 999mins (continuously adjustable).
  • 【Reverse Protection】Built-in a diode to provide protection against accidental reverse polarity for the circuits.
  • 【Sleep Mode】If no operation within 5 minutes, the digital tube of the relay board will turn off automatically. Pressing any button can wake it up.
  • 【Parameter Setting】OP(conduction time) / CL(off time) / LOP(circuit times) can be set individually, and the parameters are mutually independent. All parameters are permanently saved once set. The functions and parameters can be reviewed or changed at a later time.

Handle schema initialization with care

Automatic schema initialization can be convenient during development, but Spring’s standard initialization scripts can drop existing Quartz tables and delete triggers on restart. Do not use spring.quartz.jdbc.initialize-schema=always against a persistent production database unless that destructive behavior is explicitly intended. For production, manage the Quartz tables through a reviewed, controlled database migration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Initialize Quartz in a plain servlet application

For a servlet deployment that does not use Spring Boot’s Quartz integration, Quartz provides two lifecycle patterns: org.quartz.ee.servlet.QuartzInitializerListener and QuartzInitializerServlet. The listener can read context parameters for the configuration file, shutdown behavior, and startup behavior. The servlet pattern uses load-on-startup.

Listener lifecycle settings

Quartz’s servlet cookbook documents these context parameters for the initializer listener:

Rank #3
Multifunction Time Relay 16A Delay ON Off Time Relay GRT8-M1 AC DC 12-240V,10 Relay Timer Control Delay Function Mode DIN Rail Electronic Relays of Wide Time Delay Range for 0.1 Seconds to 10 Days
  • FUNCTION & APPLICATION: GRT8-M1 multifunctional timer relay, can preset machine start or stop time, 5 time functions controlled by power supply voltage, 4 time functions controlled by control input, 1 latching relay function. It has a wide delay setting range from 0.1 seconds to 10 days, wide working voltage AC230V (50-60Hz), rated current of 16A. Output contact: 1SPDT (1NO1NC). This 12V time delay relay can be used in industrial equipment, lighting manufacturing, heating element control, motors to accurately control the delay time of changing lighting, heating, motors, machines, etc
  • INDICATOR BUTTON: grt8 m1 ac dc 12-240v the working status of the delay relay is indicated by the LED : the green LED is always on (power on), the green LED is off (power abnormality); the red LED flashes (indicating the start of work), when the relay delay function is working, the red LED is always on, and the red LED is off (indicating the stop of work). Refer to the detailed technical parameters for further customization and optimal performance: a. Select the desired function, e.g., A (Power-On Delay). b. Set the required delay time, e.g., 30 minutes. c. Adjust the time range knob to 1h. d. Turn the percentage knob to 50% for precise control. Please check the instructions and videos
  • Model of GRT8 Time Relay: 1. GRT8-A: Delay ON time relay; GRT8-B: Delay Off time relay; GRT8-S:Asymmetric Cycle Timer Relay (OFF-ON-OFF and ON-OFF-ON, the duration of OFF and ON can be set); GRT8-M: Multi functional time relay, covering GRT8 series A (delayed power on), B (delayed disconnection), C (cyclic delay: OFF-ON-OFF), D (cyclic delay: ON-OFF-ON),and function E as shown in the figure, F,G,H,I,J
  • Designed time relay: The GRT8 series delay relay has a sealed housing made of industrial grade ABS plastic to protect internal components. Its sturdy design can accompany your expensive equipment for a longer period of time and complies with UL standards CE、CB、RoHS。 The Din rail delay timer relay measures 2.88 inches x 3.68 inches x 0.9 inches, weighs approximately 2.7 ounces, and is installed on a 35mm Din rail. Durable, easy to install, portable and compact
  • WORRY FREE AFTER-SALES SERVICE: We provides a 30 day no reason return and a 3-year warranty for this product. If you have any questions about installation or use, or if you encounter any problems during use, please feel free to reach up to us at any time
  • quartz:config-file — identifies the Quartz configuration file.
  • quartz:shutdown-on-unload — controls whether Quartz shuts down when the web application unloads.
  • quartz:wait-on-shutdown — controls whether shutdown waits for running jobs.
  • quartz:start-scheduler-on-load — controls whether the scheduler starts when the application loads.

Choose shutdown and startup behavior deliberately: a scheduler that should run only while the web application is deployed needs a lifecycle tied to that deployment. Confirm that only the intended application instances start a scheduler.

Configure a JDBC JobStore

For persisted scheduling state, configure the JDBC JobStore against a relational database and create the Quartz tables before starting the scheduler. Set the JobStore implementation, data source name, driver delegate, table prefix or schema, and transaction behavior to match the database and transaction model. Keep schema changes under controlled migration rather than relying on a destructive startup script.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quartz recommends sizing the data-source connection pool to at least the scheduler’s worker-thread count plus three connections. Treat this as a minimum recommendation from the Quartz configuration reference, not a universal performance guarantee: the scheduler and application may also make database calls, so monitor contention and size the pool for actual demand.

Rank #4
Timer Relay Module, DC 12V Adjustable Timer Delay Turn Off Module Timing Relay Time Switch 1~10sec
  • Precision Timing Control: The DC 12V Adjustable Timer Delay Turn OFF Module offers high precision with stable and Sturdy performance. Its accuracy ensures that your projects operate seamlessly, making it best for both amateur and professional applications. With the adjustable delay time ranging from 1 to 10 seconds, you can achieve the exact timing needed for your specific requirements, supporting various automation endeavors effectively
  • Versatile Applications: This timer relay module is designed to fit various use cases including timer-operated devices, robotics, smart home automation, and PLC development. Its wide application range means it can effectively be used in electronic projects and intelligent product development, making it an invaluable tool in both personal and professional environments. You can easily integrate it into your existing systems or use it to enhance the functionality of new designs
  • Easy with Trigger Switch: The module features a convenient trigger button switch that simplifies the process of activating your connected load. By powering on and pressing the trigger switch, you can turn on the load, which will then automatically switch off after the preset delay time. This user-friendly design makes it easy for anyone to implement timer functions without complicated wiring or routines, streamlining your workflow
  • Customizable Timing Duration: This timer module allows for customization of the timing range. While it comes with a default adjustment range of 1 to 10 seconds via a potentiometer, you can easily extend this duration by replacing the capacitor or potentiometer with larger counterparts. This flexibility ensures that the module can cater to a diverse array of timing needs, allowing for more complex applications without requiring additional modules
  • Sturdy Input Featuring reverse input protection, this timer module ensures enhanced safety for your devices. This significant feature protects both the module and the connected load from potential damage due to incorrect power connections. Such reliability allows you to use the module with confidence in various setups, reducing the risk of equipment failure due to electrical mishaps, and contributing to longer-lasting project performance
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Configure clustering only with JDBC JobStore

Quartz clustering requires a JDBC JobStore and a shared database. The Quartz configuration reference states that clustering works by having each node share the same database; for each firing, only one node fires the job. Configure org.quartz.jobStore.isClustered=true, give every node a unique instanceId, and synchronize the clocks across nodes.

Keep the relevant Quartz configuration consistent across cluster members and point every node at the same Quartz tables. A non-clustered scheduler must not run against tables used by another active scheduler: starting multiple non-clustered instances against one table set can corrupt data or leave trigger state inconsistent.

Use this configuration workflow

  1. Confirm the runtime baseline. Record the Java version, javax.* or jakarta.* namespace, servlet container, Spring Boot version if applicable, database vendor, and transaction model.
  2. Add the matching dependency. Use the Quartz dependency for a plain servlet application, or spring-boot-starter-quartz for Spring Boot.
  3. Select persistence and transactions. Use RAMJobStore for ephemeral single-process scheduling, JobStoreTX for application-managed transactions, or JobStoreCMT where container or JTA transactions are required.
  4. Create the database schema if using JDBC. Apply the vendor-appropriate Quartz schema through a controlled migration before startup. Avoid destructive automatic initialization on persistent production data.
  5. Set scheduler and storage properties. Configure scheduler identity, worker-thread pool size, JobStore, data source, driver delegate, table prefix or schema, misfire threshold, and transaction properties for the application.
  6. Register scheduled work. Register JobDetail, Trigger, Calendar, and any listeners through the application’s chosen integration.
  7. Bind startup and shutdown to deployment. In a plain servlet application, use the initializer listener or startup servlet lifecycle pattern; in Spring Boot, use beans and spring.quartz properties.
  8. For a cluster, verify every node before starting it. Use the shared database, enable clustering, assign unique instance IDs, and synchronize clocks.
  9. Monitor operation. Check that only intended nodes start the scheduler, and monitor database locks, misfires, trigger states, and connection-pool contention.

What performance can you expect?

The Quartz project documentation does not establish a universal web-application throughput or latency figure. Performance depends on the workload, JobStore, database, thread-pool and connection-pool settings, and deployment environment. Test with representative jobs and monitor the database and scheduler under the conditions you expect in production rather than relying on a generic benchmark.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Quartz Scheduler project documentation describes Quartz as open source and freely available under the Apache 2 License.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.