I have used rules like these in my system crontabs for a while.

On www1:
7-59/20 * * * *

On www2:
17-59/20 * * * *

This handy declaration allows running cron somewhere every 10 minutes, or every 20 minutes if one web server is down. We're evaluating moving to Elysia cron and found that this rule doesn't work:

7-59/10 * * * *

The expected run times are then 7, 17, 27, 37, 47 and 57 minutes past the hour. We use this to balance loads for many things that run every 10 minutes by adjusting the offsets. Elyisa cron currently ignores the part before the slash and reads this as if it were:

*/10 * * * *

CommentFileSizeAuthor
#1 cron_step_offsets-1705724-1.patch1.41 KBcedarm

Comments

cedarm’s picture

StatusFileSize
new1.41 KB

So the regexp part is pretty easy, but I don't completely understand how _elysia_cron_next_run() works. Here's a patch that supports my use case, but ignores the end of the range, so 7-47/10 * * * * would not work as expected.

cedarm’s picture

Priority: Normal » Minor

Not as convenient, but for now I'll just fall back to:
7,17,27,37,47,57 * * * *

andrey.troeglazov’s picture

Assigned: Unassigned » andrey.troeglazov
Issue summary: View changes
kala4ek’s picture

Assigned: andrey.troeglazov » Unassigned