Configure the Runtime Built-in Scheduler

The scheduler built in the runtime stores all the schedules into a database.

The backend database is by default an H2 database built in the runtime, which provides a ready-to-use configuration.

For production environments, we recommend using a dedicated database storage, using for example an Oracle, Microsoft SQL Server (MSSQL), etc dedicated database. See Certified Database Servers.

The built-in H2 database is, by default, only accessible from the runtime itself, and is NOT recommended for production use. See Built-in H2 database.

Configure the Scheduler

To configure the runtime scheduler:

  1. Prepare the database:

    1. Create in the database of your choice (See Certified Database Servers.) the necessary schema/database to host the schedules, as well as the database user to access this storage.

    2. Manually create the scheduler 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.

  2. Configure the properties/engineParameters.xml file as explained below.

  3. Restart the runtime.

The above steps are necessary to configure the scheduler storage to your database. If you are using the default runtime configuration, the schedules are stored in an H2 database built in the runtime. See Built-in H2 database.
Example 1. Sample scheduler configuration (engineParameters.xml)
    <!-- Main properties -->
    <parameter name="org.quartz.scheduler.instanceName" value="RUNTIME_H2_STD"/>
    <parameter name="org.quartz.scheduler.instanceId" value="RUNTIME_H2_STD"/>
    <!-- Configure ThreadPool -->
    <parameter name="org.quartz.threadPool.class" value="org.quartz.simpl.SimpleThreadPool"/>
    <parameter name="org.quartz.threadPool.threadCount" value="3"/>
    <!-- Configure Jobstore -->
    <parameter name="org.quartz.jobStore.misfireThreshold" value="10000"/>
    <parameter name="org.quartz.jobStore.class" value="org.quartz.impl.jdbcjobstore.JobStoreTX"/>
    <parameter name="org.quartz.jobStore.driverDelegateClass" value="org.quartz.impl.jdbcjobstore.StdJDBCDelegate"/>
    <parameter name="org.quartz.jobStore.useProperties" value="false"/>
    <parameter name="org.quartz.jobStore.dataSource" value="internal"/>
    <parameter name="org.quartz.jobStore.tablePrefix" value="STB_"/>
    <parameter name="org.quartz.jobStore.isClustered" value="false"/>
    <!-- Configure Datasources --> (1)
    <parameter name="org.quartz.dataSource.internal.driver" value="org.h2.Driver"/>
    <parameter name="org.quartz.dataSource.internal.URL" value="jdbc:h2:file:scheduler/internalDb;SCHEMA=SCHEDULER"/>
    <parameter name="org.quartz.dataSource.internal.user" value="backend-user"/>
    <parameter name="org.quartz.dataSource.internal.password" value="backend-password"/>
    <parameter name="org.quartz.dataSource.internal.connectionProvider.class" value="com.indy.engine.scheduler.XdiQuartzConnectionProvider"/>
    <parameter name="org.quartz.dataSource.internal.maxConnections" value="5"/>
    <parameter name="org.quartz.dataSource.internal.module" value="internal"/>
    <...> (2)
1 Configure the scheduler parameters to your database.
2 The runtime is using quartz as the scheduler. You can add or modify any other quartz parameters in this configuration.
For the Runtime to communicate with the database hosting your schedules, you must install that database’s JDBC driver and libraries in the Runtime Module that you specified in the org.quartz.dataSource.internal.module parameter.
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.
The legacy is still supported for compatibility purposes. To use the legacy file instead of the built-in configuration, remove the <scheduler></scheduler> configuration from the engineParameters.xml file and add the legacy file to the runtime properties folder.