spring-boot-scheduling

Installation
SKILL.md

Spring Boot Scheduling Standards

Priority: P0

Implementation Guidelines

Scheduled Tasks

  • ThreadPool: ALWAYS configure a dedicated TaskScheduler (default is 1 thread). Enable with @EnableScheduling annotation.
  • Async: Keep @Scheduled methods light; offload to @Async/Queues. Wrap logic in try/catch; log errors and use @Retryable for retry on transient failures.

Distributed Locking (ShedLock)

  • Problem: @Scheduled runs on ALL pods in K8s.
  • Solution: Use ShedLock to guarantee single execution.
  • Config: Set lockAtMostFor (deadlock safety) and lockAtLeastFor (debounce).

Anti-Patterns

Installs
1
GitHub Stars
60
First Seen
Jun 12, 2026
spring-boot-scheduling — comeonoliver/skillshub