Sunan Ibn Majah, Volume 2, Book 5, Hadith 1312 (DarusSalam)

It was narrated that Ibn ‘Umar said: “Two ‘Eid came together at the time of the Messenger of Allah, so he led the people in prayer, then he said: ‘Whoever wishes to come to Friday (prayer), let him come, and whoever wishes to stay behind, let him stay behind.’”

حَدَّثَنَا جُبَارَةُ بْنُ الْمُغَلِّسِ، حَدَّثَنَا مِنْدَلُ بْنُ عَلِيٍّ، عَنْ عَبْدِ الْعَزِيزِ بْنِ عُمَرَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ اجْتَمَعَ عِيدَانِ عَلَى عَهْدِ رَسُولِ اللَّهِ ـ صلى الله عليه وسلم ـ فَصَلَّى بِالنَّاسِ ثُمَّ قَالَ ‏ "‏ مَنْ شَاءَ أَنْ يَأْتِيَ الْجُمُعَةَ فَلْيَأْتِهَا وَمَنْ شَاءَ أَنْ يَتَخَلَّفَ فَلْيَتَخَلَّفْ ‏" ‏ ‏.‏

sunnah.com