Added function to retrieve bg jobs.