Hangfire for Java: Why JobRunr is What .NET Developers Are Looking For

If you’re a .NET developer moving to Java or looking for Hangfire’s equivalent in the Java ecosystem, JobRunr offers the same developer experience with even more features.

  • Nicholas D’hondt
  • April 29, 2026

Hangfire for Java: Why JobRunr is What .NET Developers Are Looking For

If you’ve worked with .NET, you probably know Hangfire. It’s the go-to library for background job processing: fire and forget jobs, delayed jobs, recurring jobs, continuations. Simple API, built in dashboard, persistent storage.

Now you’re working in Java. You’re looking for the same thing. JobRunr is that thing.

What Makes Hangfire Great

Hangfire solved background job processing for .NET developers. Before Hangfire, you had Windows Services, custom queue consumers, and a lot of boilerplate. Hangfire gave you:

  • Simple lambda syntax for creating jobs
  • Persistent storage so jobs survive restarts
  • A built in dashboard to monitor everything
  • Automatic retries with exponential backoff
  • Distributed processing across multiple servers

Sound familiar? These are exactly the features JobRunr provides for Java.

JobRunr: The Java Equivalent

Let’s compare the APIs side by side.

Fire and Forget Jobs

Hangfire (.NET):

BackgroundJob.Enqueue(() => Console.WriteLine("Fire-and-forget!"));

JobRunr (Java):

BackgroundJob.enqueue(() -> System.out.println("Fire-and-forget!"));

Almost identical. JobRunr uses Java 8 lambdas the same way Hangfire uses .NET lambdas.

Delayed Jobs

Hangfire (.NET):

BackgroundJob.Schedule(
    () => Console.WriteLine("Delayed!"),
    TimeSpan.FromDays(7));

JobRunr (Java):

BackgroundJob.schedule(Instant.now().plus(Duration.ofDays(7)),
    () -> System.out.println("Delayed!"));

Recurring Jobs

Hangfire (.NET):

RecurringJob.AddOrUpdate(
    "myrecurringjob",
    () => Console.WriteLine("Recurring!"),
    Cron.Daily);

JobRunr (Java):

BackgroundJob.scheduleRecurrently("myrecurringjob", Cron.daily(),
    () -> System.out.println("Recurring!"));

Continuations

Hangfire (.NET):

var jobId = BackgroundJob.Enqueue(() => Step1());
BackgroundJob.ContinueJobWith(jobId, () => Step2());

JobRunr Pro (Java):

BackgroundJob
    .enqueue(() -> step1())
    .continueWith(() -> step2());

Job chaining is a Pro feature in JobRunr, just like batch continuations in Hangfire Pro.

The Dashboard

If you loved Hangfire’s dashboard, you’ll feel right at home with JobRunr’s.

JobRunr's built in dashboard shows all your jobs, their status, and lets you retry or delete them

Both dashboards give you:

  • Real time view of all jobs
  • Job status filtering (enqueued, processing, succeeded, failed)
  • Detailed exception information for failed jobs
  • Manual retry and delete actions
  • Server monitoring

JobRunr’s dashboard is embedded in your application. No separate deployment needed.

Storage Options

Hangfire supports:

  • SQL Server
  • Redis (Pro)
  • PostgreSQL (community)

JobRunr supports:

  • PostgreSQL
  • MySQL / MariaDB
  • Oracle
  • SQL Server
  • SQLite
  • DB2
  • H2
  • MongoDB

JobRunr has broader storage support out of the box, including NoSQL options in the open source version.

Framework Integration

Hangfire integrates with:

  • ASP.NET Core
  • OWIN

JobRunr integrates with:

  • Spring Boot (with starter)
  • Quarkus (with extension)
  • Micronaut (with integration)
  • Plain Java

If you’re using Spring Boot (which many .NET developers move to), JobRunr has first class support:

<dependency>
    <groupId>org.jobrunr</groupId>
    <artifactId>jobrunr-spring-boot-4-starter</artifactId>
    <version>8.5.0</version>
</dependency>

Add the dependency, configure your database, and you’re done.

What JobRunr Does Differently

Carbon Aware Scheduling

JobRunr can schedule jobs to run when electricity is greenest. This is unique to JobRunr.

BackgroundJob.schedule(CarbonAware.between(now, now.plus(5, HOURS)),
    () -> generateReport());

Built in Observability

JobRunr integrates with Micrometer out of the box. If you’re using Prometheus, Grafana, or any other monitoring tool, JobRunr metrics flow right in. No extra configuration.

Getting Started

If you’re ready to try JobRunr, start here:

  1. 5 Minute Introduction to understand the basics
  2. Spring Boot Configuration if you’re using Spring
  3. Pro Features if you need enterprise capabilities

Or just add the dependency and start writing jobs. The API will feel familiar.

// This is all you need to create a background job
BackgroundJob.enqueue(() -> sendWelcomeEmail(user.getId()));

Welcome to Java. Your background jobs are in good hands.


Looking for help migrating from .NET to Java? Talk to us about your project.

The JobRunr Blog

Everything you need to know about
background processing

Explore technical deep-dives, product updates, and real-world examples to help you build, scale, and monitor your Java background jobs.

blog image

August 26, 2025

Building a Semantic Search Engine: A Blueprint for Vector Search using Oracle Database, JobRunr, and Spring

Step-by-step guide to building a semantic search engine using Oracle Database’s AI Vector Search, JobRunr for background jobs, and Spring Boot.

Read More Details
blog image

August 14, 2023

JobRunr & JobRunr Pro v6.3.0

Stability improvements, Dashboard improvements, Micronaut 4 support, Kotlin 1.9 support and Job Timeouts!

Read More Details
blog image

February 7, 2021

v1.3.0 - Small improvements

Release v1.3.0 - aka Made in Germany

Read More Details
call to action

Try JobRunr yourself, no install required

Walk through 21 hands-on scenarios in our hosted demo and feel how JobRunr handles real-world workflows. Open it in your browser, no setup, no signup.

Launch the interactive demo