Class JobRunr

java.lang.Object
org.jobrunr.configuration.JobRunr

public class JobRunr extends Object
This class provides the entry point for the JobRunr configuration. This is needed when you want to use the static methods on BackgroundJob to enqueue and schedule jobs. It also allows starting the Dashboard, which will be available on port 8000 by default.
An example:
     JobRunr.configure()
                .useJobActivator(jobActivator)
                .useJobStorageProvider(jobStorageProvider)
                .useBackgroundJobServer()
                .useJmxExtensions()
                .useDashboard()
                .initialize();

Both the backgroundJobServer and the dashboard fluent API allow to be enabled or disabled using ENV variables which is handy in docker containers.

An example:
    boolean isBackgroundJobServerEnabled = true; // or get it via ENV variables
    boolean isDashboardEnabled = true; // or get it via ENV variables
    JobRunr.configure()
                .useJobStorageProvider(jobStorageProvider)
                .useJobActivator(jobActivator)
                .useBackgroundJobServerIf(isBackgroundJobServerEnabled)
                .useDashboardIf(isDashboardEnabled)
                .useJmxExtensions()
                .initialize();