The moon rotates around the earth on a regular basis and the earth moves around the sun on a regular basis. As a result scientists can calculate when the moon will block our view of the sun from any position on earth. (an eclipse is defined as the moon blocking the sun)