<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye" -->

---
title: DB-Scheduler: A Persistent, Cluster-Friendly Scheduler...
description: A tutorial introduces db-scheduler, a persistent, cluster-aware Java task scheduling library positioned as a simpler alternative to Quartz. It requires Java...
canonical: https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: DB-Scheduler: A Persistent, Cluster-Friendly Scheduler for Java | daily.dev
og:description: A tutorial introduces db-scheduler, a persistent, cluster-aware Java task scheduling library positioned as a simpler alternative to Quartz. It requires Java...
og:url: https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye
og:image: https://api.daily.dev/og/posts/NajDvpqYE.png
og:image:alt: DB-Scheduler: A Persistent, Cluster-Friendly Scheduler for Java
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# DB-Scheduler: A Persistent, Cluster-Friendly Scheduler for Java

**[Baeldung](https://daily.dev/sources/baeldung)** · 8 min read · 17 upvotes · 1 comments

## Summary

A tutorial introduces db-scheduler, a persistent, cluster-aware Java task scheduling library positioned as a simpler alternative to Quartz. It requires Java 17+, a JDBC connection, and a single database table to store and manage tasks. The guide covers setting up the Scheduler instance with configurable polling and heartbeat intervals, and walks through three task types: simple recurring tasks (static schedules), one-time tasks (scheduled dynamically with custom data), and dynamic recurring tasks (registered at runtime but running on a fixed schedule). It also shows how to integrate db-scheduler with Spring Boot using dedicated starter dependencies for Spring Boot 3.x and 4.x, plus configuration via application properties.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://feeds.feedblitz.com/~/968126534/0/baeldung>

## Questions this post answers

### How do I set up db-scheduler with Spring Boot 4?

Add the db-scheduler-spring-boot-4-starter dependency at version 16.12.0, which automatically creates and starts a Scheduler bean and discovers any task beans to register with it. For Spring Boot 3.x, use db-scheduler-spring-boot-starter instead. Configuration such as polling interval, heartbeat interval, missed heartbeats limit, and thread count can be set via standard db-scheduler.* properties.

_Teams wiring scheduled jobs into Spring Boot services can track library and version details like these via daily.dev._

### What database table structure does db-scheduler need to work?

It requires a single table, typically named scheduled_tasks, with columns for task_name, task_instance, task_data, execution_time, picked status, picked_by, last_success, last_failure, consecutive_failures, last_heartbeat, version, and priority, with a primary key on task_name and task_instance. DDL scripts are provided for most major RDBMS engines, including PostgreSQL.

_Developers evaluating persistent Java schedulers can compare setup requirements like this through daily.dev._

### What is the difference between one-time tasks and dynamic recurring tasks in db-scheduler?

One-time tasks run once at a scheduled instant using a TaskDescriptor and are triggered with scheduler.schedule(), while dynamic recurring tasks are also registered at runtime via a TaskDescriptor but continue running on a schedule, such as a cron expression, after their first execution. Both differ from simple recurring tasks, which are defined with a static schedule at startup rather than scheduled dynamically.

_Java developers deciding how to structure scheduled jobs can research these distinctions via daily.dev._

## Similar posts on daily.dev

- [Getting a Cron Expression From Database for a Spring Boot Scheduled Job](https://daily.dev/posts/getting-a-cron-expression-from-database-for-a-spring-boot-scheduled-job-2pj2u5ing) · Baeldung · 20 upvotes · 0 comments
- [Distributed Job Scheduling Using ElasticJob](https://daily.dev/posts/distributed-job-scheduling-using-elasticjob-6wroxropf) · Baeldung · 1 upvotes · 0 comments
- [dbos-inc/dbos-transact-java: Lightweight Durable Java Workflows](https://daily.dev/posts/dbos-inc-dbos-transact-java-lightweight-durable-java-workflows-36j64qw5y) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#spring-boot](https://daily.dev/tags/spring-boot)

[View this post on daily.dev](https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"DB-Scheduler: A Persistent, Cluster-Friendly Scheduler for Java","url":"https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye"},"datePublished":"2026-08-22T23:25:37.601Z","dateModified":"2026-09-14T07:18:37.776Z","description":"A tutorial introduces db-scheduler, a persistent, cluster-aware Java task scheduling library positioned as a simpler alternative to Quartz. It requires Java...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9880ebb8ae54ad1c710ef3bf168d3e40?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9880ebb8ae54ad1c710ef3bf168d3e40?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Baeldung","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Baeldung","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/52cccfb454d946c4b7dfa5e816f9e576","url":"https://daily.dev/sources/baeldung"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":17},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"java,spring-boot","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Baeldung","item":"https://daily.dev/sources/baeldung"},{"@type":"ListItem","position":3,"name":"DB-Scheduler: A Persistent, Cluster-Friendly Scheduler for Java"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/db-scheduler-a-persistent-cluster-friendly-scheduler-for-java-najdvpqye#faq","mainEntity":[{"@type":"Question","name":"How do I set up db-scheduler with Spring Boot 4?","acceptedAnswer":{"@type":"Answer","text":"Add the db-scheduler-spring-boot-4-starter dependency at version 16.12.0, which automatically creates and starts a Scheduler bean and discovers any task beans to register with it. For Spring Boot 3.x, use db-scheduler-spring-boot-starter instead. Configuration such as polling interval, heartbeat interval, missed heartbeats limit, and thread count can be set via standard db-scheduler.* properties. Teams wiring scheduled jobs into Spring Boot services can track library and version details like these via daily.dev."}},{"@type":"Question","name":"What database table structure does db-scheduler need to work?","acceptedAnswer":{"@type":"Answer","text":"It requires a single table, typically named scheduled_tasks, with columns for task_name, task_instance, task_data, execution_time, picked status, picked_by, last_success, last_failure, consecutive_failures, last_heartbeat, version, and priority, with a primary key on task_name and task_instance. DDL scripts are provided for most major RDBMS engines, including PostgreSQL. Developers evaluating persistent Java schedulers can compare setup requirements like this through daily.dev."}},{"@type":"Question","name":"What is the difference between one-time tasks and dynamic recurring tasks in db-scheduler?","acceptedAnswer":{"@type":"Answer","text":"One-time tasks run once at a scheduled instant using a TaskDescriptor and are triggered with scheduler.schedule(), while dynamic recurring tasks are also registered at runtime via a TaskDescriptor but continue running on a schedule, such as a cron expression, after their first execution. Both differ from simple recurring tasks, which are defined with a static schedule at startup rather than scheduled dynamically. Java developers deciding how to structure scheduled jobs can research these distinctions via daily.dev."}}]}
```

