A queue based scheduler