cronutil

package
v0.19.1087 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

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) % floor(window/minute) minutes, spreading emitters that share a schedule across the window instead of firing them all on the same tick.

It never fails: a zero or sub-minute window, an empty emitter ID, an unsupported minute-field shape (ranges, names, descriptors), or a rewritten expression that fails cron.ParseStandard all return the schedule unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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