The Messenger of Allah ﷺ said, "That I sit with a group remembering Allah the Exalted from the dawn prayer until the sun rises is more beloved to me than freeing four descendants of Ismail. And that I sit with a group remembering Allah from the afternoon prayer until the sun sets is more beloved to me than freeing four."
حدثنا محمد بن المثنى حدثني عبد السلام يعني ابن مطهر أبو ظفر حدثنا موسى بن خلف العمى عن قتادة
قال رسول الله ﷺ لأن أقعد مع قوم يذكرون الله تعالى من صلاة الغداة حتى تطلع الشمس أحب إلي من أن أعتق أربعة من ولد إسمعيل ولأن أقعد مع قوم يذكرون الله من صلاة العصر إلى أن تغرب الشمس أحب إلي من أن أعتق أربعة
[Its chain is daif] Bayhaqi reported it in Shuab al-Iman, no. 561, from the hadith of Abdul-Salam bin Mutahhar with this wording. Qatada narrated it using "an" (the ambiguous form associated with tadlis). The hadith has daif corroborating narrations, see Musnad Jami, edited by me, 7/439, no. 5305.