How to create quartz spring dynamic in database

Friday, August 4th, 2017 (0 Comment)

To continue Integrated Quartz Job in Spring MVC, we will create quartz spring dynamic and store schedulers into database.

Example: we have two quartz job are JOB1 and JOB2 with two schedulers. We will store these schedulers into database and can change them.

We need to review syntax by cron in cronmaker.com

1) We use oracle database and create table for quartz spring dynamic as below

Script create JOB_INFO table and insert data

  • 0 * * * * ? * : Job run at every one minute (check syntax at cronmaker.com)

2) Class job1 and job2 to do something

job1.java

job2.java

3) Call job1 and job2 by quartz spring dynamic

JobSchedulerHandle.java

JobExecution.java

JobListener.java

4) Controller to handle jobs

JobInfoController.java

5) Config quartz spring dynamic

spring-quartz.xml

6) Page to show list jobs and edit for each job in quartz spring dynamic

jobinfos.jsp

jobinfoEdit.jsp

Download source code here

Tags: , ,

Related Posts

spring
Spring mvc mongodb crud users roles
spring
Java spring mvc tutorial on lvtutorial.com
spring
Angularjs spring mvc crud example
spring
How to upload sheet excel into database using Spring MVC

Related Posts

spring
Spring mvc mongodb crud users roles
spring
Java spring mvc tutorial on lvtutorial.com
spring
Angularjs spring mvc crud example
spring
How to upload sheet excel into database using Spring MVC

Leave a Reply

Your email address will not be published. Required fields are marked *