Unvaccinated children were asked to quarantine for three weeks amid a measles outbreak in two schools.