It is narrated from Sayyiduna Wathilah bin al-Asqa' (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Keep away from the mosques your children, your insane, your buying and selling, your disputes, the raising of your voices, the carrying out of your prescribed punishments and the drawing of your swords; burn incense in them at the Friday gathering, and set up places for ablution at their doors."
Hadith Referenceالمعجم الكبير للطبراني / باب الواو / 18356