As long as it is said in faith and for a particular spiritual benefit.
Even though St. Joseph never spoke a word in scripture, his silent example of obedient faithfulness and diligent care for the Holy Family during Jesus’ formative years has made him one of the most beloved saints of Christianity.
Devotion to the foster-father of Jesus is generally traced to the 3rd or 4th century, but according to the Pieta prayer book, there is a prayer to St. Joseph that dates to the year 50.
This prayer was found in the 50th year of our Lord and Savior Jesus Christ. In 1505, it was sent from the pope to Emperor Charles when he was going into battle. Whoever shall read this prayer or hear it or keep it about themselves, shall never die a sudden death or be drowned, nor shall poison take effect on them; neither shall they fall into the hands of the enemy or be burned in any fire or be overpowered in battle. Say for nine mornings for anything you desire. It has never been known to fail.
Here is the prayer, which some claim “has never been known to fail, provided that the request is for one’s spiritual benefit or for those whom we are praying for.”
O St. Joseph, whose protection is so great, so strong, so prompt before the throne of God, I place in you all my interest and desires.O St. Joseph, do assist me by your powerful intercession, and obtain for me from your divine Son all spiritual blessings, through Jesus Christ, our Lord. So that, having engaged here below your heavenly power, I may offer my thanksgiving and homage to the most loving of Fathers.O St. Joseph, I never weary of contemplating you, and Jesus asleep in your arms; I dare not approach while He reposes near your heart. Press Him close in my name and kiss His fine head for me and ask Him to return the kiss when I draw my dying breath. St. Joseph, patron of departing souls, pray for me. Amen.
Remember, God always answers our prayers. We may not always expect the response we receive.
The Powerful 30 Day Prayer to St. Joseph