A study conducted by researchers at the Rice University, Texas, and the University of California looked at how vegetables react to different times of the day.
Just before sunrise they start producing chemicals to keep hungry insects away.
The scientists took advantage of this and manipulated plants to produce more of these antioxidant chemicals, thus keeping insects away for longer.
Aside from the cancer-fighting advantage of producing more of these chemicals, the practical use for this is that vegetables can be kept fresh and free from unpleasant creatures for longer, as even after being picked plants still retain their internal clock for a while.
In this video watch as caterpillars devour a leaf of cabbage far faster than one whose internal clock had been kept ticking.