Split pending tasks to scheduled and unscheduled