fix the roof while the sun is shining

Etymology
From the notion that it is easier and more beneficial to fix a roof during dry rather than wet weather.

Verb

 * 1)  To deal with a problem or potential problem while conditions are favorable.