Wait for stuff to happen before running a process