Modified script to spawn a process if jobs are okay.