Jobs ordering according to dependency