The one who enters the mosque should not sit down until he performs some Rak’ah Sunan Ibn Majah 1012

Arabic hadith text
حَدَّثَنَا إِبْرَاهِيمُ بْنُ الْمُنْذِرِ الْحِزَامِيُّ، وَيَعْقُوبُ بْنُ حُمَيْدِ بْنِ كَاسِبٍ، قَالاَ حَدَّثَنَا ابْنُ أَبِي فُدَيْكٍ، عَنْ كَثِيرِ بْنِ زَيْدٍ، عَنِ الْمُطَّلِبِ بْنِ عَبْدِ اللَّهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ قَالَ ‏"‏ إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلاَ يَجْلِسْ حَتَّى يَرْكَعَ رَكْعَتَيْنِ ‏"
Translation
It wasnarrated from Abu Hurairah that the Messenger of Allah (ﷺ)said

“When anyone of you enters the mosque, let him not sit downuntilhe performs two Rak’ah.”