Added code to avoid concurrent execution of the jobs