On the noise-induced passage through an unstable periodic orbit II: General case