Circadian rhythms are endogenously generated daily oscillations in physiology found in all kingdoms of life. Experimental studies have shown that the fitness of Synechococcus elongatus, a photosynthetic microorganism, is severely affected in non-24h environments. However, it has been difficult to study the effects of clock-environment mismatch on cellular physiology because such measurements require the precise determination of both clock state and growth rates in the same cell. Here, we designed a microscopy platform that allows us to expose cyanobacterial cells to pulses of light and dark while quantitatively measuring their growth, division rate, and circadian clock state over many days. Our measurements reveal that decreased fitness can result from a catastrophic growth arrest caused by unexpected darkness in a small subset of cells with incorrect clock times corresponding to the subjective morning. We find that the clock generates rhythms in the instantaneous growth rate of the cell, and that time of darkness vulnerability coincides with the time of most rapid growth. Thus, the clock mediates a fundamental trade-off between growth and starvation tolerance in cycling environments. By measuring the response of the circadian rhythm to dark pulses of varying lengths, we constrain a mathematical model of a population's fitness under arbitrary light/dark schedules. This model predicts that the circadian clock is only advantageous in highly regular cycling environments with frequencies sufficiently close to the natural frequency of the clock.