scheduler

Provides repeated tasks execution based on Cron expressions for Hexagon framework. It uses the Cron-utils Java Library.

!!! Note In some platforms (i.e.: Kubernetes) there is a way to execute repeated tasks, you could take advantage of them, as using your own service will raise problems scaling those services' instances (you will have to coordinate them).

This feature does not include any sort of synchronization if you have many instances of a scheduler service. If you want your scheduled jobs to be executed just once, you have to take care of synchronization yourself.

Install Dependency

=== "build.gradle"

```groovy
repositories {
    mavenCentral()
}

implementation("com.hexagontk:scheduler:$hexagonVersion")
```

=== "pom.xml"

```xml
com.hexagontkscheduler$hexagonVersion
```

Example

You can check a usage example in the following code:

Packages

Link copied to clipboard

Classes for scheduling blocks of code repeatedly based on a Cron expression.