cron

Scheduled tasks with @Scheduled

Spring's @Scheduled annotation enables method execution on fixed intervals or cron expressions. @EnableScheduling activates scheduling infrastructure. Fixed delay waits after completion, fixed rate executes at intervals regardless of duration. Cron ex

Robfig cron jobs with context cancellation and jitter

Scheduled jobs get risky when deploys overlap or when jobs take longer than their interval. I use robfig/cron with a wrapper that creates a per-run context.WithTimeout, adds a bit of jitter to avoid synchronized load across instances, and logs start/f