Module adding mongodb support for db-scheduler
This module provides 3 main components :
MongoTaskRepository, a mongo implementation ofTaskRepositoryMongoSchedulerBuilder, a builder to make it easy to create a scheduler with the mongo repositoryMongoScheduler, a scheduler extending theScheduler, particularly thecreatemethod
This module aims to be the less intrusive as possible regarding the main project modules.
- Add maven dependency :
<dependency>
<groupId>com.github.piemjean</groupId>
<artifactId>db-scheduler-mongo</artifactId>
<version>9.3</version>
</dependency>- Instantiate and start the scheduler
final Scheduler scheduler = MongoScheduler
.create(mongoClient, "scheduler-database", "scheduler-collection",
knownTasks).build();
scheduler.start();- Use the scheduler as detailed in the main documentation