Restart Quartz jobs stored in DB: how?

Issue with Scheduler Application Using Spring Boot & Quartz

I have a scheduler application which runs using Spring Boot & Quartz. I have created the job with multiple triggers (cron) which is running perfectly fine but the triggers are not firing when the application is restarted. I have tried storing the details of job and triggers at a user-defined table and loading the details upfront when the application starts, but I am not sure if this is the right approach.

I have searched through a lot of articles and github projects to find out how to restart/resume/re-initiate jobs but I haven’t been able to find a solution. I am hoping someone with a better understanding of Quartz can provide an answer.

One possible solution is to use the JobStoreTX as your Quartz job store. This will allow your job and trigger details to be stored in a database, which will persist even after the application is restarted. To configure the JobStoreTX, you can add the following properties to your file:

spring.quartz.jdbc.url=<your database url>
spring.quartz.jdbc.user=<your database username>
spring.quartz.jdbc.password=<your database password>

You will also need to configure the JobDetail and Trigger beans to use the JobStoreTX:

public class QuartzConfig {

    private DataSource dataSource;

    public JobDetail jobDetail() {
        return JobBuilder.newJob().ofType(MyJob.class)
            .withDescription("My Quartz Job")

    public Trigger trigger(JobDetail job) {
        return TriggerBuilder.newTrigger().forJob(job)
            .withSchedule(CronScheduleBuilder.cronSchedule("0 * * * * ?"))

    public SchedulerFactoryBean schedulerFactoryBean() {
        SchedulerFactoryBean schedulerFactory = new SchedulerFactoryBean();
        return schedulerFactory;

With this configuration, your job and trigger details should be persisted in the database and should resume running when the application is restarted.