Roosters crow all the time. The connection with the sun coming up is a misconception. They might, on occasion, crow right at dawn.
Roosters crow because they hear other roosters crowing, to show that a certain place in the barnyard is their turf, to try and assert their authority over another rooster.
They will even crow to call the ladies back to the run, when they are out free ranging.