The Church teaches the necessity of resting from servile work on Sundays. We remember that even God rested after Creation:
“He rested on the seventh day from all the work which he had done” Genesis 2:2
Because of this the Church obligates her members to rest on the Lord’s day. The Canon Law states:
“On Sundays and other holy days of obligation, the faithful are obliged to participate in the Mass. Moreover, they are to abstain from those works and affairs which hinder the worship to be rendered to God, the joy proper to the Lordâ€™s Day, or the suitable relaxation of mind and body” (CIC 1247).
Mother Church also recognizes reality that legitimate reasons excuse from this obligation so the Catechism of the Catholic Church says:
“Family needs or important social service can legitimately excuse from the obligation of Sunday rest. The faithful should see to it that legitimate excuses do not lead to habits prejudicial to religion, family life, and health” (CCC 2185).
What this means is that you are called to fulfill your Sunday obligation by attending Mass and avoiding work, however, if you have to you should. If it is about health, family life and well being