Should he leave his job and go and pray taraaweeh?
Question

                I work in a police station, and sometimes I have to work the night shift twice in a week. During this time I cannot leave the station because of my work situation and the orders of my bosses. Is it permissible for me to leave the station and go against their orders so that I can offer taraaweeh prayer in the mosque that is near the station?.
Praise be to Allah.Undoubtedly a person’s keenness to do more of the things that bring reward and forgiveness in Ramadaan is something good and praiseworthy. But this is subject to the condition that the pursuit of something good should not lead to neglect of something that is even better. 
If a person’s work is in business or in a civil institution, it is not permissible for him to leave his work in order to offer a naafil prayer, so how about one whose work has to do with security which is an important matter on which people’s lives and well-being depend? 
You should not seek to do an naafil act if that is at the expense of something that is obligatory. You can offer taraaweeh in your place of work two rak’ahs at a time, depending on how much free time you have, or you can offer it at the end of the night in your home. The reward in full may be written for you, if Allaah knows that you are sincere in wanting to perform it even though it may not be easy to do so at work or at home. 
Shaykh Muhammad al-Saalih al-‘Uthaymeen (may Allaah have mercy on him) was asked: 
I work in a store and I cannot pray Taraaweeh in the mosque because my work hours are from after Maghrib until almost the time of sahoor. Am I sinning because of this? How can I make up for this reward that I am missing out on? 
He replied: 
You are not sinning by missing taraaweeh because taraaweeh is Sunnah; if a person does it he will be rewarded for it but if he does not do it there is no sin on him.   
Allaah knows your intention and that if it were not for the fact that you are occupied with something that you must do, which is earning a living from this job, then you would have prayed taraaweeh. The bounty of Allaah is immense and He will reward you according to your intention. 
Fataawa Islamiyyah, 2/255. 
Shaykh ‘Abd al-‘Azeez Aal al-Shaykh (may Allaah preserve him) was asked: 
Some people go for ‘Umrah and leave their families, their work and the mosques where they used to pray or give the adhaan. What would you say to them? 
He replied: 
We should not seek to draw closer to Allaah by doing naafil acts and neglecting obligatory duties. We cannot draw close to Him though naafil deeds until we have performed the obligatory duties. Whoever neglects his house or work, or if an imam neglects his role of leading the prayers, this is not regarded as commendable; rather it is regarded as sinful. 
And Allaah knows best.