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

Tilde for random value in a range #124

Open
MrMikeJJ opened this issue Mar 10, 2024 · 0 comments
Open

Tilde for random value in a range #124

MrMikeJJ opened this issue Mar 10, 2024 · 0 comments

Comments

@MrMikeJJ
Copy link

The crontab man page references using a tilde for randomness, with the random value picked when parsing happens.

https://man7.org/linux/man-pages/man5/crontab.5.html

Randomization of the execution time within a range can be used. A random number within a range specified as two numbers separated with a tilde is picked. The specified range is inclusive. For example, 6~15 for a 'minutes' entry picks a random minute within 6 to 15 range. The random number is picked when crontab file is parsed. The first number must be less than or equal to the second one. You might omit one or both of the numbers specifying the range. For example, ~ for a 'minutes' entry picks a random minute within 0 to 59 range.

It would be nice if NCrontab supported this feature.

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

1 participant