Quartz Scheduler integration in Spring Boot Framework
The purpose of this project is to simplify the quartz scheduler integration in spring boot framework. I came up with this while setting up quartz scheduler in one of the projects at work.
- Annotate your Job implementation with
Scheduled
annotation with required configuration by setting suitable fields present in the annotation.
import com.indusnode.quartz.annotation.Scheduled;
...
@Scheduled(interval="5", intervalType=Scheduled.IntervalType.SEC)
class TestJob implements Job {
//...
}
- set application property
qe.base-package
as your base package name of the project which will contain all your job implementations. - And you are done! No need to define factories, JobDetail, Triggers...etc.
NOTE: This library currently doesn't provide database support for quarts data. You may setup those settings in traditional way besides this library.
In a Maven project, include the quartz-easy
artifact in the dependencies section of your pom.xml
<dependency>
<groupId>com.indusnode</groupId>
<artifactId>quartz-easy</artifactId>
<version>1.0.0</version>
</dependency>
implementation 'com.indusnode:quartz-easy:1.0.0'
For other build systems please refer Maven Central Repository.
If you do not use maven, gradle, ivy, or other build systems that consume maven-style binary artifacts, they can be downloaded directly via the Maven Central Repository.
Lets make this more simpler and effective! Looking forward to PRs. 😄👍