[Scheduler Plugin] Refactored to comply with the new generated API.