An auto-scheduler