12 15 13 14 21 22 25 23 24 31 32 35 33 34 41 42 45 43 44 6 7 10 8 9 16 17 20 18 19 26 27 30 28 29 36 37 40 38 39 46 47 50 48 49 def sublist(def ids, def webbotIndex, def webbotsInParallel) { int total = ids.size() def sublistsSize = (total / webbotsInParallel) as int ids.collate(sublistsSize)[webbotIndex] } def ids = 1..50 def webbotsInParallel = 6 sublist(ids, 3, webbotsInParallel) [1, 2, 3, 4, 5, 6, 7, 8] [9, 10, 11, 12, 13, 14, 15, 16] [17, 18, 19, 20, 21, 22, 23, 24] [25, 26, 27, 28, 29, 30, 31, 32] [33, 34, 35, 36, 37, 38, 39, 40] [41, 42, 43, 44, 45, 46, 47, 48] [49, 50]