agentsclimarketplace

Spring boot scheduling

Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/spring-boot-scheduling

Standards for scheduled tasks and distributed locking with ShedLock. Use when implementing @Scheduled tasks or distributed locking with ShedLock in Spring Boot. (triggers: **/*Scheduler.java, **/*Job.java, scheduled, shedlock, cron)From its SKILL.md

Install
npx -y skills add ComeOnOliver/skillshub --skill spring-boot-scheduling

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.2 KB, 237 tokens by cl100k_base, as published. Nobody here has run it

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

  • No Default Pool: Configure dedicated TaskScheduler (default is 1 thread).
  • No duplicates: Use ShedLock for distributed cron in multi-pod deployments.
  • No task state: Design tasks to be idempotent; assume pod can restart.

References

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,852. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.