>Synopsis:      crontab(5) clarification:  "~" field is evaluated once at 
>install time
>Category:      documentation system amd64
>Environment:
        System      : OpenBSD 7.5
        Details     : OpenBSD 7.5-current (GENERIC) #150: Wed Jun 26
20:30:54 MDT 2024

dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:
        The crontab(5) manpage could be more explicit about the fact
        that a "~" char only gets evaluated to a random value once, at
        table install time.

        From the EXAMPLES section:

        # run hourly at a random time within the first 30 minutes of the hour
        0~30 * * * *   /usr/libexec/spamd-setup

        "run hourly at a random time" could me interpreted as "run
        hourly, with a different random minute every hour".
        This is not the case and may be unexpected for some users.

>How-To-Repeat:
        # some initial random minute, repeating itself every hour
        ~ * * * *   date >> /tmp/LOG

>Fix:
        Just clarify that "~" will be evaluated at table install time
        and then be reused.

        Thanks,
        --Kor

Reply via email to