From the course: Spring: Spring Batch

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Scheduling jobs

Scheduling jobs

From the course: Spring: Spring Batch

Start my 1-month free trial

Scheduling jobs

- [Instructor] Spring batch supports many schedulers, including an open source Java based scheduler named Quartz. Within Quartz, a scheduler is used to trigger a job. These concepts align well with those found in Spring Batch, making the two a great pair. Let's take a look at how to schedule a batch job with Quartz. When first getting started with Quartz you need to update your pom.xml file in order to include the dependencies for Quartz. I've already included this dependency within my pom. You'll notice that Spring Boot provides a spring-boot-starter-quartz dependency, which will apply many auto configurations for you to help you get up and running quickly. After updating your pom, the next thing that you'll need to do is have your application class extend a QuartzJobBean. Once we extend the QuartzJobBean we'll need to add some methods that are required by that class. So just hover over the marker, hit Control + one and…

Contents