r/SpringBoot • u/LongCelebration4425 • 28d ago
How-To/Tutorial I built a starter that discovers every @Scheduled and Quartz job and alerts you when one stops running
Scheduled jobs in Spring fail in the quietest way possible: an exception kills a cron thread, a pool gets starved, a property resolves to the wrong cron, and nothing tells you. You find out days later because a report or a backup is missing.
I've been building SilenceWatch, an open source heartbeat monitor, and its Spring Boot starter is the part I care about most. You add one dependency and an API key:
<dependency>
<groupId>com.silencewatch</groupId>
<artifactId>silencewatch-spring-boot-starter</artifactId>
<version>0.1.0</version>
</dependency>and in application.yml:
silencewatch:
api-key: ${SILENCEWATCH_API_KEY}On startup it finds every @Scheduled method and every Quartz job, declares each one with its resolved schedule (${backup.cron} becomes the actual expression), and reports every run with its duration and any exception. If a job doesn't run when it should, you get an email, Slack, Teams, Discord or webhook alert.
A few things I was strict about:
- It never fails or blocks your job: errors are swallowed and logged at WARN, and sending happens on a bounded queue in a background daemon thread.
- No key, no network or no server, and your app behaves exactly as without it.
silencewatch.enabled: falseturns it all off. - No Jackson or other heavy dependency forced on you.
- Stable job identity (
com.acme.jobs.BackupJob#run), so history survives restarts and redeploys. A job removed from the code is flagged orphaned, never deleted. - Staging and production show up as separate checks.
Java 17+, tested on Spring Boot 3.5 and 4.1. The server is Apache 2.0 and self-hostable with Docker Compose, free and without limits. There's also a hosted version with a free plan (10 checks).
Starter source: https://github.com/liliang-dev/SilenceWatch/tree/main/clients/java/spring-boot
Site: https://silencewatch.com/spring-boot/
I'd really like feedback from people running a lot of scheduled jobs. What breaks for you that this wouldn't catch?
