This is documentation for Semarchy xDI 2023.2, which is no longer supported. For more information, see our Global Support and Maintenance Policy. |
Configure the Runtime Built-in Scheduler
The scheduler built in the runtime stores all the schedules into a database.
The schedules database is by default an H2 database built in the runtime, which provides a ready-to-use configuration. You can alternately store the schedules in a dedicated database.
Configuring Scheduler Storage
To configure the runtime schedules storage:
-
Create in the database of your choice the necessary schema/database to host the schedules, as well as the database user to access this storage.
-
Manually create the tables in the target database/schema using the script corresponding to your database technology. The script is in the
/scripts/scheduler
folder of the runtime installation directory. -
Configure the
properties/engineScheduler.properties
file as explained below. -
Restart the runtime or reinstall the runtime service.
Configure the Scheduler Datasource
In the engineScheduler.properties
file, the org.quartz.jobStore.dataSource
parameter defines the datasource used to store the schedules:
-
The specific
internal
value stores the schedules in the internal H2 database. -
To use a different database, set the
org.quartz.jobStore.dataSource
parameter to a datasource name (for example:datasource01
), and the define the datasource connection parameters, as shown below.
#============================================================================
# Configure Main Scheduler Properties
#============================================================================
org.quartz.scheduler.instanceName = RUNTIME_H2_STD
org.quartz.scheduler.instanceId = RUNTIME_H2_STD
#============================================================================
# Configure ThreadPool
#============================================================================
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 3
#============================================================================
# Configure JobStore
#============================================================================
org.quartz.jobStore.misfireThreshold = 10000
#org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties=false
org.quartz.jobStore.dataSource=internal
org.quartz.jobStore.tablePrefix=STB_
org.quartz.jobStore.isClustered=false
#============================================================================
# Configure Datasources
#============================================================================
org.quartz.dataSource.internal.driver = org.h2.Driver
org.quartz.dataSource.internal.URL = jdbc:h2:tcp://localhost:42100/scheduler/internalDb;SCHEMA=SCHEDULER
org.quartz.dataSource.internal.user = sa
org.quartz.dataSource.internal.password =
org.quartz.dataSource.internal.provider=hikaricp
org.quartz.dataSource.internal.maxConnections = 5
semarchy.xdi.runtime.scheduler.internal.module = internal
For the Runtime to communicate with the database hosting your schedules, you must install that database’s JDBC driver and librairies in a the module that you specified for the datasource. |
The org.quartz.jobStore.misfireThreshold property defines the number of milliseconds to wait after a delivery schedule gets misfired, before considering the next schedules of this delivery. For example, if a delivery schedule is misfired because another one was still running, the scheduler will wait this amount of time before considering the next schedules for this delivery.
|