#!/bin/bash # Run N apps concurrently. Each worker has its OWN controller session dir (walk28.py sets w.SC), # and drill pushes are serialised by a lock file — one git clone cannot take two pushes at once. cd "$(dirname "$0")" N=${N:-3} for app in "$@"; do while [ "$(pgrep -cf '[w]alk28.py')" -ge "$N" ]; do sleep 5; done echo "$(date +%H:%M:%S) launching $app" nohup python3 -u walk28.py "$app" > "apps/$app.out" 2>&1 & sleep 8 done wait echo "$(date +%H:%M:%S) batch done"