CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

What is Spring Boot?

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.


By using spring boot , your application will become quite simple to implement. You can focus more on your business without taking care of boring configurations.


What is quartz?

Quartz is a richly featured, open source job scheduling library that can be integrated within virtually any Java application



Create your first project with quartz

Create a new spring boot project in, select the libraries you needed. Quartz can be supported since spring boot 2.0.0-M2. Let's create a gradle project with spring boot 2.0.0-M3 in our cases.

After import your project in Intellij idea, you will find following dependencies with quartz
dependencies {


Quartz provide a scheduler factory for you to get a scheduler, you can simply autowired SchedulerFactoryBean and invoke getScheduler() to grab a scheduler instance.


If you want to something more, such as have your own job. You need to implement the execute method of Job in quartz.
 public class CustomizeJob implements Job {
public void execute(JobExecutionContext context) throws JobExecutionException {
System.out.println("My customize job!");

Then you need to binding your job to JobDetail as defined in javadoc of Quartz.

Conveys the detail properties of a given Job instance. JobDetails are to be created/defined with JobBuilder.
 JobDetail jobDetail = JobBuilder.newJob(CustomizeJob.class).withIdentity("testJob","group1").build();


When you try to set the trigger point of your job, you need to create your own trigger
 Trigger trigger = TriggerBuilder.newTrigger().withIdentity("trigger1", "group1")


Then schedule your customize job by invoke


You will find the print message in your console.


Something more than quick start?

If you want to get more information about the job, trigger and scheduler, you can implement the listener interface provided by quartz


As you can find in the methods list, you can use schedulerListener to track the progress of your job and scheduler such as by invoking jobPaused, jobResumed. JobListener can be used when a JobDetail executes. TriggerListener can be used to track trigger actions and status.

There are a lot advanced method supported in You can have more details in the document. Quartz is a quite useful library for scheduling. It is supported in spring boot 2.x, you can easily use it in your sprint boot projects. Enjoy!