We investigate the routing of a single-photon in a modulated cavity optomechanical system, in which the cavity is driven by a strong coupling field, and the mechanical resonator (MR) is modulated with a weak coherent field. We show that, when there is no a weak coherent field modulating the MR, the system cannot act as a single-photon router, since the signal will be completely covered by the quantum and thermal noises. By introducing the weak coherent field, we can achieve the routing of the single-photon by adjusting the frequency of the weak coherent field, and the system can be immune to the quantum and thermal noises.