cronus

lightweight cron library for java

Лицензия

Лицензия

Группа

Группа

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

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

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

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

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

cronus
lightweight cron library for java
Организация-разработчик

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

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

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

https://github.com/addthis/cronus

Скачать cronus

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

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

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 17.0
com.google.code.findbugs : jsr305 jar 2.0.3
org.slf4j : slf4j-api jar 1.7.7

test (2)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-simple jar 1.7.7
junit : junit jar 4.11

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

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

cronus

What's this?

cronus is a lightweight cron Java library. It accepts Vixie Cron syntax for specifying patterns. cronus uses JSR 311 and requires Java 8 or higher.

Building

cronus uses Apache Maven which it is beyond the scope to detail. The super simple quick start is:

mvn test

Use

<dependency>
  <groupId>com.addthis</groupId>
  <artifactId>cronus</artifactId>
  <version>latest-and-greatest</version>
</dependency>

You can either install locally, or releases will eventually make their way to maven central.

Example

        // Create a scheduler with one execution thread
        CronScheduler scheduler = new CronScheduler.Builder(1).build();
        // Create a pattern that runs every minute
        Future<?> future = scheduler.schedule(CronPattern.build("* * * * *"),
            () -> System.out.println("hello world"), false);
        // Scheduled patterns do not execute until scheduler is started up
        scheduler.start();
        for(int i = 0; i < 70; i++) {
            Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
            System.out.print(i + " ");
        }
        // Future can be cancelled
        future.cancel(false);
        for(int i = 0; i < 50; i++) {
            Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
            System.out.print(i + " ");
        }
        scheduler.stop();

Versioning

It's x.y.z where:

  • x: something major happened
  • y: next release
  • z: bug fix only

License

cronus is released under the Apache License Version 2.0. See Apache or the LICENSE for details.

com.addthis

AddThis

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

Версия
0.1.0