I need to use --delay parameter to run multiple scripts. I found
(unexpectedly) that the execution of the delays is bound to a single
core. In my machine I have 2 cores.
For example
time seq 10 | parallel -P0 --delay 8 -u 'echo {} start $(date +"%H:%M:%S")'
This is the output:
1 start 16:17:45
2 start 16:17:53
3 start 16:17:53
4 start 16:18:01
5 start 16:18:01
6 start 16:18:09
7 start 16:18:09
8 start 16:18:17
9 start 16:18:17
10 start 16:18:25
real 0m40.251s
...
I expect that every 8 seconds a process will starts. This is not true
because parallel thinks in terms of cores. So every core will wait 8
seconds and parallel will run 2 process every 8 seconds.
I want to wait 8 seconds as a global waiting time between processes,
not depending by cores number. I know that parallel tries to optimize
but this is my goal, I cannot let those processes start
simultaneously.
Is there a way to do it ? Thanks.