Frage

I am new to quartz. i configured jdbcjobstore with mysql with below configuration. Its working fine if i create a scheduler via java.

# Main Quartz configuration
org.quartz.scheduler.skipUpdateCheck = true
org.quartz.scheduler.instanceName = DatabaseClusteredScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.jobFactory.class = org.quartz.simpl.SimpleJobFactory
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.dataSource = quartzDataSource
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = true
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5

# JobStore: JDBC jobStoreTX
org.quartz.dataSource.quartzDataSource.driver = com.mysql.jdbc.Driver
org.quartz.dataSource.quartzDataSource.URL = jdbc:mysql://192.168.1.2:3306/fatdb
org.quartz.dataSource.quartzDataSource.user = root
org.quartz.dataSource.quartzDataSource.password = root
org.quartz.dataSource.quartzDataSource.maxConnections = 8

my question is it's possible to put entries(like scheduler, job and other info ) directly on particular Quartz tables without writing program.

eg i am getting particular time from the user if i insert the time and appropriate scheduler details into quartz tables and if i call the listener with above config, does it work?

if it will works which are tables and what are the fields i need to configure.

War es hilfreich?

Lösung 2

I figured out and it works. I inserted values only into 3 tabels and it was working preety well. Tables you need to configure:[QRTZ_JOB_DETAILS], [QRTZ_TRIGGERS] and [QRTZ_CRON_TRIGGERS].

Andere Tipps

You should not directly write to quartz database via SQL.

Quartz Best Practices


JDBC JobStore
Never Write Directly To Quartz's Tables

Writing scheduling data directly to the database (via SQL) rather than
using scheduling API:

Results in data corruption (deleted data, scrambled data)
Results in job seemingly "vanishing" without executing when a trigger's fire time arrives
Results in job not executing "just sitting there" when a when a trigger's fire time arrives
May result in: Dead-locks
Other strange problems and data corruption

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top