Login
You're viewing the functional.cafe public feed.
  • Oct 31, 2026, 1:08 PM

    @hzulla

    At google, the internal cron service has a "@" option in the crontab which effectively hashes the name and uses that to pick a value for the entry so it's stable for a given job but globally distributed.

    So instead of `0 0 0 * * *` for running a job daily at midnight, you would do `@ @ 0 * * *` to run it at a randomly chosen but stable time between midnight and 1 am.

    💬 1🔄 1⭐ 5

Replies

  • 💬 1🔄 0⭐ 0
  • Oct 31, 2026, 7:11 PM

    @DamonHD @hzulla

    I might have the order wrong but I'm pretty sure I put @ for seconds and minutes and 0 for hours which would start at a random but stable minute and second within the given hour

    💬 1🔄 0⭐ 0
  • Oct 31, 2026, 7:49 PM

    @gbargoud @hzulla we may be talking across one another here, but cron only goes does to minute resolution AFAIK; seconds can't be specified in any version that I've seen or used.

    💬 1🔄 0⭐ 0
  • Oct 31, 2026, 8:15 PM

    @DamonHD @hzulla

    Oh I must be misremembering that part then. It's been a while since I had to write a crontab and I always have to consult the comment at the top and then forget everything once I exit.

    💬 1🔄 1⭐ 0
  • 💬 0🔄 0⭐ 0