The Messenger of Allah ﷺ said, "One of you takes up grazing livestock and attends the congregational prayer, but then his livestock become difficult for him, so he says, 'If only I sought out for my livestock a place with better pasture than this,' and so he moves away and attends nothing but the Friday prayer. Then his livestock become difficult for him again, so he says, 'If only I sought out for my livestock a place with better pasture than this,' and so he moves away and attends neither the Friday prayer nor the congregational prayer, and his heart is sealed."
حدثنا أبو سعيد حدثنا عبد الرحمن بن أبي الرجال قال سمعت عمر مولى غفرة يحدث عن ثعلبة بن أبي مالك
قال رسول الله ﷺ يتخذ أحدكم السائمة فيشهد الصلاة في جماعة فتتعذر عليه سائمته فيقول لو طلبت لسائمتي مكانا هو أكلأ من هذا فيتحول ولا يشهد إلا الجمعة فتتعذر عليه سائمته فيقول لو طلبت لسائمتي مكانا هو أكلأ من هذا فيتحول فلا يشهد الجمعة ولا الجماعة فيطبع على قلبه
No references are available.
Its isnad is daif because of Umar bin Abdullah, the freed slave of Ghufrah. Munziri said, 511, he is trustworthy according to Ahmad, but Haythami graded him daif, 2/192. It is found in Tabarani's Al-Kabir, 3/229, number 3229.