This module provides support for scheduling batch job executions in batch applications. It contains 2 sub-modules that provides 3 types of batch job scheduler:
- jberet-schedule-executor sub-module
- scheduler based on
java.util.concurrent.ScheduledExecutorService
, suitable for Java SE applications. - scheduler based on
jakarta.enterprise.concurrent.ManagedScheduledExecutorService
, suitable for Java EE applications.
- scheduler based on
- jberet-schedule-timer sub-module
- scheduler based on EJB Timer
Other types of job scheduler implementations are also possible by extending org.jberet.schedule.JobScheduler
.
ScheduledExecutorService-based JobScheduler
can be configured with:
- a custom
ManagedScheduledExecutorService
JNDI lookup name (Java EE app only); - a
java.util.concurrent.ConcurrentMap<String, JobSchedule>
to store all job schedules; - fully-qualified name of the implementation class of
JobSchedue
.
To clean and build:
mvn clean install
- In Java SE applications:
- include jberet-schedule-executor module in application classpath.
- See tests using jberet-schedule-executor in Java SE environment.
- In Java EE or web applications deployed to JBoss EAP & WildFly:
- include jberet-schedule-executor module and optionally jberet-schedule-timer module in application package.
- Sample app using jberet-schedule-executor: wildfly-jberet-samples/scheduleExecutor
- Sample app using jberet-schedule-timer: wildfly-jberet-samples/scheduleTimer