Never. Becoming SOTH invariably torpedoes any credible presidential aspirations, and Ryan knew that when he took the job.
Sometimes I wonder if that would still be the case if Henry Clay had won any of his multiple failed campaigns. I know Polk won, but he was Speaker for a much shorter time and to this day he is the only Speaker to become president. Seems strange that the person who’s second-in-line to the presidency and arguably the second-most powerful person in the government is so rarely considered for the job. I guess they take a lot of flak nationally (certainly Pelosi has), but this has been the case since long before our current age of national polarization and mass media. It almost seems like tradition at this point that SOTH just never runs for president. And maybe those who take the job are less likely to have presidential aspirations, and that’s either a cause or an effect of said tradition.
The last Speaker, I believe, to make a presidential run was John Nance Garner in 1932. Until that it wasn't really that uncommon for them to run, just to name Champ Clark.
What about Gingrich and Gephardt?