I have a bash script to upload data to a site. I was getting slow upload speeds, so I started running it in parallel, 5 at the same time, using xargs and -N1.
However, the problem is that the server asks me to solve a captcha if I run it 5 at a time, whereas it works fine with 1 at a time.
I figure this is because all the processes start at exactly the same time, I'm getting flagged.
Anyway so here's the question, is there any way for me to add a wait (say 1 second) between starting processes in xargs/gnu parallel?
The only thing I could come up with is using pgrep script | wc -1 to count the script instances, and sleep for that number of seconds.
However, this is really not optimal, are there any better ways of doing this?