Question: do it while the sun shines?
Answer: If you make hay while the sun shines, it means that you take advantage of the chance to do something while conditions are good. In other words, you make good use of your time or make the most of an opportunity while you have the chance.