The Messenger of Allah ﷺ said, "The sun and the moon do not eclipse for the death or life of anyone, but they are two of the signs of Allah . So when you see them, perform the prayer."
حدثنا هارون حدثنا ابن وهب أخبرني عمرو بن الحارث أن عبد الرحمن بن القاسم حدثه عن أبيه
عن رسول الله ﷺ قال إن الشمس والقمر لا يخسفان لموت أحد ولا لحياته ولكنهما آية من آيات الله تبارك وتعالى فإذا رأيتموهما فصلوا
Its isnad is sahih. Qasim, the father of Abdul-Rahman, is Qasim bin Muhammad bin Abu Bakr Siddiq, whose reliability was already established at 1757. We add here that Bukhari gave his biography in al-Kabir 4/1/157, and in al-Saghir 121, and Ibn Abu Hatim in al-Jarh wal-Tadil 3/2/118. He and Bukhari in al-Kabir both narrated from Abu Zinad, who said, "I have not seen anyone more knowledgeable of the sunnah than Qasim." Bukhari added, "A man was not counted as a man until he knew the sunnah."This hadith was narrated by Bukhari, 437-438, Muslim, 251, and Nasai, 1:213-214, all three of them through Ibn Wahb, with this isnad. Al-Hafiz also attributed it in al-Fath to Ibn Khuzayma and Bazzar, through the route of Nafi from Ibn Umar, in similar wording, ending with, "Hasten to prayer, and to the remembrance of Allah, and pray, and give charity." See also what has already appeared at 3374 and 4387.