Hadithcore
Mishkat al-Masabih, 970

Anas reported God’s Messenger as saying, “To sit with people who make mention of God after the morning prayer till sunrise is more pleasing to me than setting free four of the descendants of Ishmael, and to sit with people who make mention of God after the afternoon prayer till the sun sets is more pleasing to me than setting four free.” Abu Dawud transmitted it.

وَعَنْ أَنَسٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَأَنْ أَقْعُدَ مَعَ قَوْمٍ يَذْكُرُونَ اللَّهَ مِنْ صَلَاةِ الْغَدَاةِ حَتَّى تَطْلُعَ الشَّمْسُ أَحَبُّ إِلَيَّ مِنْ أَنْ أُعْتِقَ أَرْبَعَةً مِنْ وَلَدِ إِسْمَاعِيلَ وَلَأَنْ أَقْعُدَ مَعَ قَوْمٍ يَذْكُرُونَ اللَّهَ مِنْ صَلَاةِ الْعَصْرِ إِلَى أَنْ تَغْرُبَ الشَّمْسُ أَحَبُّ إِلَيَّ مِنْ أَنْ أُعْتِقَ أَرْبَعَة» . رَوَاهُ أَبُو دَاوُد

References1 variant
In-Book Reference
Book 4, Hadith 393