spring-boot-scheduling

Installation
SKILL.md

Spring Boot Scheduling Standards

Priority: P0

Configure Scheduled Tasks

  • ThreadPool: ALWAYS configure dedicated TaskScheduler (default 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.

Lock Tasks with ShedLock

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

See implementation examples for ShedLock distributed task configuration and scheduler pool setup.

Anti-Patterns

Installs
2
GitHub Stars
521
First Seen
Jun 18, 2026
spring-boot-scheduling — hoangnguyen0403/agent-skills-standard