Repository navigation
Run scheduled jobs across replicas with the GoForj Cache backend your application already uses. Scheduler v2.3.0 adds occurrence claims and shared pause controls alongside owner-aware leases.
- Use
NewCacheLockerfor overlap protection,OncePerOccurrenceto retain a dispatch claim, andWithPauseStoreto pause recurring work across replicas. - Use
RunIffor conditions evaluated on each run. Calendar filters follow the job's timezone or the scheduler default, including across day boundaries. - Manual runs respect execution limits and locks. Cancellation stops pending policy callbacks and task startup, and admin pause controls identify native jobs they cannot pause.
go get github.com/goforj/scheduler/v2@v2.3.0Requires Go 1.25 or newer. Keep fluent registration on the returned builder. Drain older workers that share lock keys before upgrading to owner-aware leases. Redis-backed locks require EVAL permission. See the upgrade guide for naming and execution changes.