schedule jobs according to a greedy alg