Either grab the PID (process ID) from the script when its running, or the best scenario would be to create your own launcher that launches bots. Can use the Java Process API that's in Java 9. Additionally you'll need a way for your launcher to communicate with bots - a Socket works great here, but there are other options. Add in a database and you're good to go