thundr-contrib-quartz

A Quartz scheduler module for Thundr

Лицензия

Лицензия

Категории

Категории

Quartz Библиотеки уровня приложения Job Scheduling
Группа

Группа

com.threewks.thundr
Идентификатор

Идентификатор

thundr-contrib-quartz
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

thundr-contrib-quartz
A Quartz scheduler module for Thundr
Ссылка на сайт

Ссылка на сайт

http://github.com/kuhnza/thundr-contrib-quartz/
Организация-разработчик

Организация-разработчик

3wks
Система контроля версий

Система контроля версий

https://github.com/kuhnza/thundr-contrib-quartz

Скачать thundr-contrib-quartz

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.threewks.thundr/thundr-contrib-quartz/ -->
<dependency>
    <groupId>com.threewks.thundr</groupId>
    <artifactId>thundr-contrib-quartz</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.threewks.thundr/thundr-contrib-quartz/
implementation 'com.threewks.thundr:thundr-contrib-quartz:0.1.0'
// https://jarcasting.com/artifacts/com.threewks.thundr/thundr-contrib-quartz/
implementation ("com.threewks.thundr:thundr-contrib-quartz:0.1.0")
'com.threewks.thundr:thundr-contrib-quartz:jar:0.1.0'
<dependency org="com.threewks.thundr" name="thundr-contrib-quartz" rev="0.1.0">
  <artifact name="thundr-contrib-quartz" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.threewks.thundr', module='thundr-contrib-quartz', version='0.1.0')
)
libraryDependencies += "com.threewks.thundr" % "thundr-contrib-quartz" % "0.1.0"
[com.threewks.thundr/thundr-contrib-quartz "0.1.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.threewks.thundr : thundr jar 1.1.0
org.quartz-scheduler : quartz jar 2.1.7

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.hamcrest : hamcrest-all jar 1.3
org.mockito : mockito-all jar 1.9.5

Модули Проекта

Данный проект не имеет модулей.

Thundr Quartz

A Quartz scheduler module for Thundr

Build Status

Usage

In your ApplicationModule:

@Override
public void requires(DependencyRegistry dependencyRegistry) {
    super.requires(dependencyRegistry);

    dependencyRegistry.addDependency(QuartzModule.class);
}

Once registered as a dependency thundr-contrib-quartz injects a QuartzScheduler into the injection context. Hence you can use it as follows:

QuartzScheduler scheduler = injectionContext.get(QuartzScheduler.class);

JobDetail myJob = JobBuilder.newJob(MyJob.class)
                            .withIdentity("MyJob")
                            .build();

Trigger myJobTrigger = TriggerBuilder
        .newTrigger()
        .withIdentity("myJobTrigger")
        .withSchedule(
                SimpleScheduleBuilder.simpleSchedule()
                        .withIntervalInHours(24)
                        .repeatForever())
                        .build();

scheduler.scheduleJob(myJob, myJobTrigger);

Since Thundr Quartz is just a thin wrapper around Quartz virtually anything you can do with Quartz standalone should be possible. Refer to the official Quartz docs for details.

A note on previous versions

Previous versions of thundr-contrib-quartz required that you run the Quartz scheduler as a daemon thread to ensure a clean shutdown. This is no longer necessary as Thundr 1.x now provides shutdown hooks that allow the module to manage clean up properly.

Quartz configuration

Should you need to provide further configurations options to Quartz you should also create a quartz.properties file in your src/resources folder. All configuration values specified in the Quartz configuration docs are valid.

Версии библиотеки

Версия
0.1.0