Answer: In response to your question, I want to begin by reminding you that your provision (Rizq) is something that Allah subhanahu wa ta'ala has already written for you. It will neither miss you nor be delayed beyond what Allah has decreed.
- The Prophet ﷺ said in a hadith narrated by Abu Nu‘aym in Hilyat al-Awliya wa Tabaqat al-Asfiya—authenticated by Shaykh Muhammad Nasir al-Din al-Albani in Sahih al-Jami‘—that:
إِنَّ رَوْحَ الْقُدُسِ نَفَثَ فِي رُوعِيَ أَنَّ نَفْسًا لَنْ تَمُوتَ حَتَّى تَسْتَكْمِلَ أَجَلَهَا وَتَسْتَوْعِبَ رِزْقَهَا فَأَجْمِلُوا فِي الطَّلَبِ وَلا يَحْمِلَنَّ أَحَدَكُمُ اسْتِبْطَاءُ الرِّزْقِ أَنْ يَطْلُبَهُ بِمَعْصِيَةٍ فَإِنَّ اللَّهَ لا يُنَالُ مَا عِنْدَهُ إِلا بِطَاعَتِهِ
"Verily, the Holy Spirit inspired in my mind that a soul will never die until it finishes its term and consumes its provision. Thus, be graceful in seeking provision, and let not one of you allow the delay of provision to compel him to seek it by disobedience. Verily, Allah does not grant what is with Him but by obedience to Him." (Ḥilyat al-Awliyā’ 14924)
This means that no one will pass away until they have lived the lifespan decreed for them and received all the provision Allah has assigned to them.
If your job prevents you from fulfilling an obligation like the congregational prayer, then you must prioritise your obedience to Allah subhanahu wa ta'ala. If you leave something for the sake of Allah, He will replace it with something better.
- As the Prophet ﷺ said:
إِنَّكَ لَنْ تَدَعَ شَيْئًا لِلَّهِ عَزَّ وَجَلَّ إِلَّا بَدَّلَكَ اللَّهُ بِهِ مَا هُوَ خَيْرٌ لَكَ مِنْهُ
“Verily, you will never leave anything for the sake of Allah Almighty but that Allah will replace it with something better for you.” (Musnad Aḥmad 23074)
- Allah also promises in the Qur'an:
مَنْ عَمِلَ صَـٰلِحًۭا مِّن ذَكَرٍ أَوْ أُنثَىٰ وَهُوَ مُؤْمِنٌۭ فَلَنُحْيِيَنَّهُۥ حَيَوٰةً طَيِّبَةً ۖ وَلَنَجْزِيَنَّهُمْ أَجْرَهُم بِأَحْسَنِ مَا كَانُوا۟ يَعْمَلُونَ
"Whoever does righteous deeds—whether male or female—while being a believer, We will surely give them a good life, and We will certainly reward them according to the best of what they used to do." (Surah An-Nahl, 16:97)
Now, coming to the specific topic of congregational prayer, it is obligatory for a man who hears the adhan or is near the masjid to pray in congregation.
- The Prophet ﷺ said:
مَنْ سَمِعَ النِّدَاءَ فَلَمْ يَأْتِهِ فَلاَ صَلاَةَ لَهُ إِلاَّ مِنْ عُذْرٍ
"Whoever hears the call and does not come, his prayer is not valid, except for those who have an excuse." (Sunan Ibn Majah 793)
When Abdullah ibn Abbas رَضِيَ ٱللَّٰهُ عَنْهُمَا was asked about what qualifies as a valid excuse, he said it is fear or illness. Outside of these reasons, there is no excuse to miss the congregational prayer.
- Abu Hurayrah رضي الله عنه narrated in a hadith:
أَتَى النَّبِيَّ صلى الله عليه وسلم رَجُلٌ أَعْمَى فَقَالَ يَا رَسُولَ اللَّهِ إِنَّهُ لَيْسَ لِي قَائِدٌ يَقُودُنِي إِلَى الْمَسْجِدِ . فَسَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم أَنْ يُرَخِّصَ لَهُ فَيُصَلِّيَ فِي بَيْتِهِ فَرَخَّصَ لَهُ فَلَمَّا وَلَّى دَعَاهُ فَقَالَ " هَلْ تَسْمَعُ النِّدَاءَ بِالصَّلاَةِ " . فَقَالَ نَعَمْ . قَالَ " فَأَجِبْ "
There came to the Messenger of Allah (ﷺ) a blind man and said: Messenger of Allah, I have no one to guide me to the mosque. He, therefore, asked. Allah's Messenger (ﷺ) permission to say prayer in his house. He (tee Holy Prophet) granted him permission. Then when the man turned away he called him and said: Do you hear the call to prayer? He said: Yes. He (the Prophet then) said: Respond to it. (Sahih Muslim 653)
This shows that even someone with physical difficulties, such as blindness, is required to attend the congregational prayer if they can hear the adhan. The companions of the Prophet ﷺ were so firm on this matter that they considered abandoning the congregational prayer without a valid excuse to be a sign of hypocrisy.
- Abdullah ibn Mas‘ud رضي الله عنه said:
وَلَقَدْ رَأَيْتُنَا وَمَا يَتَخَلَّفُ عَنْهَا إِلاَّ مُنَافِقٌ مَعْلُومُ النِّفَاقِ
"... I remember when no one stayed behind from the prayer except a hypocrite who was known for his hypocrisy..." (Sunan Ibn Majah 777)
Therefore, if your workplace is preventing you from fulfilling an obligation in Islam, you are required to continue performing the obligation.
The Prophet ﷺ said:
لَا طَاعَةَ لِمَخْلُوقٍ فِي مَعْصِيَةِ الْخَالِقِ
"A creature is not to be obeyed when it involves disobedience to the "Creator." (Mishkat al-Masabih 3696)
I hope this answers your question.
— Answered by Ustadh Abdulrahman Hassan