once
إِذَا سَمِعْتُمْ صِيَاحَ الدِّيَكَةِ فَاسْأَلُوا اللَّهَ مِنْ فَضْلِهِ؛ فَإِنَّهَا رَأَتْ مَلَكاً وَإِذَا سَمِعْتُمْ نَهِيقَ الْحِمَارِ فَتَعَوَّذُوا بِاللَّهِ مِنَ الشَّيطَانِ؛ فَإِنَّهُ رَأَى شَيْطَاناً
Meaning
If you hear the crow of a rooster, ask Allah for his bounty for it has seen an angel and if you hear the braying of an ass, seek refuge in Allah for it has seen a devil.
Source and references
Hisn al-Muslim, entry 228.The reference is copied from the edition; separate editorial verification is not complete yet.
Source edition: Fortress of the Muslim. Open source ↗
