Move scheduler into replica.