To take an opportunity to do something when the time and conditions are near perfect or available.
From agriculture, when farmers gather the long grass growth of summer to dry it to produce hay as winter feed for animals; The best time to cut and dry the hay is during sunny days.