Installation
Getting Started With JobRunr Pro
Getting the JobRunr Pro Artifact
Private Maven Repository
For a more resilient and secure supply chain, we highly recommend the use of a local/private Maven Repository to cache the downloaded artifacts from our private repo.
Several tools are available to help in setting one up: Sonatype Nexus, JFrog or Reposilite are a few we can name. For more information on how to set this up, see our guide on caching Maven artifacts with a local repository.
Artifact ids
In the below Maven or Gradle usage example you may want to replace the Spring Boot 3 Starter artifact by one that fits your stack better. Here are the different artifact ids you can choose from:
- Vanilla:
jobrunr-pro - Micronaut:
jobrunr-pro-micronaut-feature - Quarkus:
quarkus-jobrunr-pro - Spring Boot 2:
jobrunr-pro-spring-boot-2-starter - Spring Boot 3:
jobrunr-pro-spring-boot-3-starter - Spring Boot 4:
jobrunr-pro-spring-boot-4-starter
Note for Kotlin Exposed Transaction support you want to include a Kotlin support artifact: see the Transaction plugin documentation for more details.
Usage with Maven
To use JobRunr Pro, just use the following Maven coordinates:
<repositories>
<repository>
<id>JobRunrPro</id>
<url>https://repo.jobrunr.io/private-releases</url>
</repository>
</repositories>
<dependency>
<groupId>org.jobrunr</groupId>
<artifactId>jobrunr-pro-spring-boot-3-starter</artifactId>
<version>${jobrunr.version}</version>
</dependency>
Then, add your provided Maven repository credentials in the Maven settings.xml:
<settings>
<servers>
<server>
<id>JobRunrPro</id>
<username>${jobrunrProAccess.userName}</username>
<password>${jobrunrProAccess.password}</password>
</server>
</servers>
</settings>
Usage with Gradle
If you are using Gradle instead, add the below to your build.gradle file.
repositories {
mavenCentral()
maven {
url "https://repo.jobrunr.io/private-releases"
credentials {
username "${jobrunrProAccess.userName}"
password "${jobrunrProAccess.password}"
}
}
}
dependencies {
implementation 'org.jobrunr:jobrunr-pro-spring-boot-3-starter:${jobrunr.version}'
}
Instead of setting the credentials in your build file and to avoid checking in this information, you can configure these in the root gradle.properties file by setting the mavenUser and mavenPass properties.
Installing the JobRunr Pro License key
Your license file sent to you will be active until the end of your current subscription period. You can monitor the license for expiration from the JobRunr Pro Dashboard and the health actuator of Spring Boot / Quarkus / Micronaut and Micrometer metrics. See JobRunr Pro’s Observability documentation for more info.
The license is saved in the database and you can apply it in any of the following ways:
- An environment variable called
JOBRUNR_PRO_LICENSEwhich is equal to the contents of the license key. - Save the license key to your
src/main/resourcesfolder (don’t forget to ignore this file in your source control system!) - Upload the contents of the license key via the dashboard
- Set the license contents via a property in case you are using a framework like Spring Boot by setting
jobrunr.license-keyequal to the contents of the license key.
Custom License Key Providers
For advanced scenarios, you can provide your own LicenseKeyProvider to dynamically retrieve license keys from custom sources like secret managers, databases, or remote services.
When the provider is queried:
- On initialization when the background job server is initiated
- Every 5 seconds when no license is available
- Once per day during normal operation (master server only)
URL-based License Keys
JobRunr provides a builtin UrlLicenseKeyProvider, it’s automatically configured when you specify an HTTP, HTTPS, or file URL:
JobRunrPro
.configure()
// ...
.useBackgroundJobServer(usingStandardBackgroundJobServerConfiguration()
.andLicenseKeyProvider("https://example.com/license-key")
)
// ...
jobrunr.license-key=https://example.com/license-key
jobrunr:
license-key: https://example.com/license-key
The allowed values are:
- A JobRunr Pro license string
- A valid HTTP(S) URL to fetch the license (e.g.,
https://example.com/license-key) - A file URI indicating the location of the license (e.g.,
file://server/folder/license.keyorfile:./license.key)
NoteThe
UrlLicenseKeyProviderhas a 5-second timeout by default. If retrieval fails, it returnsnulland retries according to the schedule above.
Custom Provider Implementation
For complete control, implement your own LicenseKeyProvider. You can configure it as below:
JobRunrPro
.configure()
// ...
.useBackgroundJobServer(usingStandardBackgroundJobServerConfiguration()
.andLicenseKeyProvider(new MyCustomLicenseKeyProvider())
)
// ...
@Singleton
public LicenseKeyProvider licenseKeyProvider() {
return new MyCustomLicenseKeyProvider();
}
@Produces
public LicenseKeyProvider licenseKeyProvider() {
return new MyCustomLicenseKeyProvider();
}
@Bean
public LicenseKeyProvider licenseKeyProvider() {
return new MyCustomLicenseKeyProvider();
}
