Update the implementation for recursive scheduling