Implement scheduling algorithm