Roosters are genetically programmed to crow with the dawn, finds a new study that could also help to explain why dogs bark and cats meow.

Previously it was unknown if crowing roosters were simply reacting to their environment.

“‘Cock-a-doodle-doo’ symbolizes the break of dawn in many countries,” Takashi Yoshimura of Nagoya University, who worked on the study, was quoted as saying in a press release. “But it wasn’t clear whether crowing is under the control of a biological clock or is simply a response to external stimuli.”

PHOTOS: 12 Eye-Opening Alarm Clocks

That’s because things like a car’s headlights can set a rooster off too, as anyone who has  lived near these birds knows.

To solve the mystery, Yoshimura and colleagues kept roosters under round-the-clock dim lighting. This didn’t deter the roosters. No matter what, they kept crowing each morning just before dawn. The researchers say this is proof that the vocalizing is entrained to a circadian rhythm. In short, the roosters are genetically programmed to crow at a certain time. At some point, the rising sun set the roosters’ internal clock, so now they crow every 24 hours.

NEWS: Most Pigeons Came From Escaped Racing Birds

Most animals, and plants too, have such an internalized timing mechanism. That’s why we tend to eat, sleep, exercise and more at around the same times. By consciously being aware of the schedule, our body has a chance to adapt to it, so well-functioning circadian rhythms are often tied to good health.

The findings, published in Current Biology, represent just the start of the team’s efforts to unravel the roosters’ innate vocalizations, which the researchers say are not learned like songbird songs or human speech.

“We still do not know why a dog says ‘bow-wow’ and a cat says ‘meow,’” Yoshimura said. “We are interested in the mechanism of this genetically controlled behavior and believe that chickens provide an excellent model.”

(Current Biology, Shimmura et al.)