In the stochastic SIS epidemic model with a contact rate $$a$$ a , a recovery rate $$b<a$$ b < a , and a population size $$N$$ N , the mean extinction time $$\tau $$ τ is such that $$(\log \tau )/N$$ ( log τ ) / N converges to $$c=b/a-1-\log (b/a)$$ c = b / a - 1 - log ( b / a ) as $$N$$ N grows to infinity. This article considers the more realistic case where the contact rate $$a(t)$$ a ( t ) is a periodic function whose average is bigger than $$b$$ b . Then $$(\log \tau )/N$$ ( log τ ) / N converges to a new limit $$C$$ C , which is linked to a time-periodic Hamilton–Jacobi equation. When $$a(t)$$ a ( t ) is a cosine function with small amplitude or high (resp. low) frequency, approximate formulas for $$C$$ C can be obtained analytically following the method used in Assaf et al. (Phys Rev E 78:041123, 2008). These results are illustrated by numerical simulations.