test is a script we want to execute with input parameter 1~52
#!/bin/bash
for ((i=1;i<=20;i++));
do
(for((j=$i;j<=52;j+=20));
do test $j
done )&
done
This started 20 threads and when 1 is finished, the next is executed