Imam al-Shafi'i (may Allah have mercy on him) says that Sa'id bin Zayd and Abu Hurayrah (may Allah be pleased with them both) used to stay at al-Shajarah, which was less than six miles away. They would sometimes attend Jumu'ah and sometimes leave it. Abdullah bin Amr bin al-As (may Allah be pleased with them both) was two miles from Ta'if; he too would sometimes attend Jumu'ah and sometimes leave it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5593