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

Add randomness to execution time #217

Open
mwgamble opened this issue Feb 15, 2024 · 1 comment
Open

Add randomness to execution time #217

mwgamble opened this issue Feb 15, 2024 · 1 comment

Comments

@mwgamble
Copy link

We have a job that needs to run once a day. We have several instances of this job running across multiple containers, and we'd like to spread the jobs out a bit. The jobs are all scheduled to run at (for the sake of an example) 8pm, but they don't actually all need to run at 8pm, they just need to run at around that time. It would be nice if we could configure a window of time (say 5-10 minutes) around which the job could run, so that they wouldn't all fire at once. This would help us avoid hitting some rate limits with a third-party API.

This is basically the RandomizedDelaySec option for systemd timers: https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html#RandomizedDelaySec=

@kibertoad
Copy link
Owner

@mwgamble That would be a great feature! Would you be open to send a PR for it?

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

2 participants