According to the schedule pipelines documentation it uses cron notation, but when trying to use random ranges it fails to parse it with a syntax error: something like 0~5 1 * * * or ~ 0 * * * doesn’t work.
Is there any other syntax to randomize cron fields in scheduled pipelines?
I don’t believe tilde
~ to be a valid character for cron. Perhaps you should be using:
0-5 1 * * *
instead. Handy website for double-checking cron formats: https://crontab.guru/
0-5 will cause the pipeline to run on minutes 0, 1, 2, 3, 4, and 5. Not on a random minute in that interval.
GitLab docs say they use Fugit to parse cron expressions. From a quick glance at Fugit README it doesn’t look like there is any syntax for randomizing run times (but there is a ticket for adding support for “~”).
Thanks @cuu508 it didn’t occur to me to look at the parser documentation. Hopefully it’ll get added soon to Fugit.