Text this: Optimal switching of vaccination for an infectious disease model