Skip to content

Tilde for random value in a range #124

Description

@MrMikeJJ

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions