Scheduler a little more general