RepositoryJavaBEBelgium
jobrunr

jobrunr/jobrunr

An extremely easy way to perform background processing in Java. Backed by persistent storage. Open and free for commercial use.

3.1kstars
327forks
3issues
6views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: java-scheduler

#1 Repository of the week

1
TINIX TRENDING·Topic: parallel-processing

#1 Repository of the week

1
TINIX TRENDING·Topic: quartz

#1 Repository of the week

JobRunr logo

The ultimate library to perform background processing on the JVM.
Dead simple API. Extensible. Reliable.
Distributed and backed by persistent storage.
Open and free for commercial use.
Recommended and loved by ThoughtWorks.


Maven Central Version  Woodpecker CI  OpenSSF Best Practices  LGPLv3 Licence

Tweet about us!  Star us! Chat with us in Github Discussions

Overview

BackgroundJob.enqueue(() -> System.out.println("This is all you need for distributed jobs!"));

Incredibly easy way to perform fire-and-forget, delayed, scheduled and recurring jobs inside Java applications using only Java 8 lambda's. CPU and I/O intensive, long-running and short-running jobs are supported. Persistent storage is done via either RDBMS (e.g. Postgres, MariaDB/MySQL, Oracle, SQL Server, DB2 and SQLite) or NoSQL (MongoDB).

JobRunr provides a unified programming model to handle background tasks in a reliable way and runs them on shared hosting, dedicated hosting or in the cloud (hello Kubernetes) within a JVM instance.

Feedback

Thanks for building JobRunr, I like it a lot! Before that I used similar libraries in Ruby and Golang and JobRunr so far is the most pleasant one to use. I especially like the dashboard, it’s awesome! Alex Denisov

View more feedback on jobrunr.io.

Features

  • Simple: just use Java 8 lambda's to create a background job.
  • Distributed & cluster-friendly: guarantees execution by single scheduler instance using optimistic locking.
  • Persistent jobs: using either a RDBMS (four tables and a view) or a NoSQL data store.
  • Embeddable: built to be embedded in existing applications.
  • Minimal dependencies: (ASM, slf4j and either jackson and jackson-datatype-jsr310, gson or a JSON-B compliant library).

Usage scenarios

Some scenarios where it may be a good fit:

  • within a REST api return response to client immediately and perform long-running job in the background
  • mass notifications/newsletters
  • calculations of wages and the creation of the resulting documents
  • batch import from xml, csv or json
  • creation of archives
  • firing off web hooks
  • image/video processing
  • purging temporary files
  • recurring automated reports
  • database maintenance
  • updating elasticsearch/solr after data changes
  • …and so on

You can start small and process jobs within your web app or scale horizontally and add as many background job servers as you want to handle a peak of jobs. JobRunr will distribute the load over all the servers for you. JobRunr is also fault-tolerant - is an external web service down? No worries, the job is automatically retried 10-times with a smart back-off policy.

JobRunr is a Java alternative to HangFire, Resque, Sidekiq, delayed_job, Celery and is similar to Quartz and Spring Task Scheduler.

Screenshots

   
   
   

Usage

Fire-and-forget tasks

Dedicated worker pool threads execute queued background jobs as soon as possible, shortening your request's processing time.

BackgroundJob.enqueue(() -> System.out.println("Simple!"));

Delayed tasks

Scheduled background jobs are executed only after a given amount of time.

BackgroundJob.schedule(Instant.now().plusHours(5), () -> System.out.println("Reliable!"));

Recurring tasks

Recurring jobs have never been simpler; just call the following method to perform any kind of recurring task using the CRON expressions.

BackgroundJob.scheduleRecurrently("my-recurring-job", Cron.daily(), () -> service.doWork());

Process background tasks inside a web application…

You can process background tasks in any web application and we have thorough support for Spring - JobRunr is reliable to process your background jobs within a web application.

… or anywhere else

Like a Spring Console Application, wrapped in a docker container, that keeps running forever and polls for new background jobs.

See https://www.jobrunr.io for more info.

Installation

Using Maven?

JobRunr is available in Maven Central - all you need to do is add the following dependency:

<dependency>
   <groupId>org.jobrunr</groupId>
   <artifactId>jobrunr</artifactId>
   <version>${jobrunr.version}</version>
</dependency>

Using Gradle?

Just add the dependency to JobRunr:

implementation 'org.jobrunr:jobrunr:${jobrunr.version}'

Configuration

Do you like to work Spring based?

Add the jobrunr-spring-boot-3-starter to your dependencies and you're almost ready to go! Just set up your application.properties:

# the job-scheduler is enabled by default
# the background-job-server and dashboard are disabled by default
jobrunr.job-scheduler.enabled=true
jobrunr.background-job-server.enabled=true
jobrunr.dashboard.enabled=true

Or do you prefer a fluent API?

Define a javax.sql.DataSource and put the following code on startup:

@SpringBootApplication
public class JobRunrApplication {

    public static void main(String[] args) {
        SpringApplication.run(JobRunrApplication.class, args);
    }

    @Bean
    public JobScheduler initJobRunr(DataSource dataSource, JobActivator jobActivator) {
        return JobRunr.configure()
                .useJobActivator(jobActivator)
                .useStorageProvider(SqlStorageProviderFactory
                          .using(dataSource))
                .useBackgroundJobServer()
                .useDashboard()
                .initialize().getJobScheduler();
    }
}

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

How can I contribute?

How to build?

  • git clone https://github.com/jobrunr/jobrunr.git
  • cd jobrunr
  • cd core/src/main/resources/org/jobrunr/dashboard/frontend
  • npm i
  • npm run build
  • cd -
  • ./gradlew publishToMavenLocal

Then, in your own project you can depend on org.jobrunr:jobrunr:1.0.0-SNAPSHOT.

Similar Projects

Discover other similar projects and AI models.

RepositoryC#
quartznet/quartznet

Quartz Enterprise Scheduler .NET

7.1k
Nov 26, 2026
RepositoryJava
xuxueli/xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)

30.7k
Oct 9, 2026
RepositoryJava
apache/shardingsphere-elasticjob

Distributed scheduled job

8.2k
Nov 27, 2026
RepositoryJava
kanwangzjm/funiture

github: https://github.com/kanwangzjm/funiture, spring项目,权限管理、系统监控、定时任务动态调整、qps限制、sql监控(邮件)、验证码服务、短链接服务、动态配置等

1.9k
Nov 15, 2023
RepositoryJava
vikeri/react-native-background-job

Schedule background jobs in React Native that run your JavaScript when your app is in the background/killed.

746
Nov 6, 2023
RepositoryJava
knowm/Sundial

A Light-weight Job Scheduling Framework

282
Oct 26, 2026
RepositoryTypeScript
triggerdotdev/trigger.dev

Trigger.dev – build and deploy durable AI agents and workflows

16.8k
Nov 28, 2026
RepositoryC#
HangfireIO/Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required

10.2k
Oct 30, 2026
RepositoryC#
jamesmh/coravel

Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!

4.3k
Jul 20, 2025