Added else blcok for sleep in job