Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add support for Jenkins-style 'H' hashed field value #309

Open
dmayle opened this issue May 7, 2020 · 4 comments
Open

[FEATURE] Add support for Jenkins-style 'H' hashed field value #309

dmayle opened this issue May 7, 2020 · 4 comments

Comments

@dmayle
Copy link

dmayle commented May 7, 2020

As mentioned in the wikipedia on cronspecs, Jenkins supports a new field value 'H' (or 'H/15', etc.) which is used to specify a random stable offset within the schedule. Jenkins hashes (hence the 'H') the job name to to allow you to give the same schedule to multiple jobs without running into the thundering herd problem.

In order to support this, the API would need to change to allow passing in a job name to use for hashing.

This would make it easier to schedule recurring jobs on kubernetes.

@dmayle
Copy link
Author

dmayle commented May 7, 2020

Interestingly enough, #307 is a feature request for adding a job name.

@alokpr
Copy link

alokpr commented Oct 25, 2020

I need to schedule hundreds of jobs with similar schedule, where this feature will be immensely useful.

@sean-
Copy link

sean- commented Dec 5, 2023

Any updates to this issue? Top-of-the-hour thundering herd is an easily preventable problem. I would love to change @hourly to H * * * * * where H renders to the hash of the Job Name, PID, hostname, or something pseudo-random. Or, instead of H, R for random.

@adampetrovic
Copy link

I've sent up a PR for this, though it looks like the repo has stopped being maintained for quite some time.

#531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants