cronutil

package
v0.19.1302 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MaxJitterWindow = time.Hour

MaxJitterWindow requests the widest spread ApplyCronJitter can express; the effective jitter is still capped at each schedule's firing interval.

Variables

This section is empty.

Functions

func ApplyCronJitter

func ApplyCronJitter(emitterID, schedule string, window time.Duration) string

ApplyCronJitter deterministically shifts the minute field of a standard 5-field cron expression by hash(emitterID) minutes. Mirrors Temporal schedule jitter semantics: window is a maximum — the effective jitter is capped at the schedule's shortest firing interval and at one hour. Never fails; anything unsupported returns the schedule unchanged.

func MinScheduleInterval added in v0.19.1088

func MinScheduleInterval(sched cron.Schedule) time.Duration

MinScheduleInterval returns the smallest gap between two consecutive fires of the given schedule, sampled over the next minIntervalProbeFires fires.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL