The military issued a statement through state television saying its operations would cease at 6 a.m. Friday and stand down through Monday.
The cease-fire was brokered by U.N.-Arab League envoy Lakhdar Brahimi.
"Syrian armed forces will, however, reserve the right to reply to terrorists attacks, attempts of armed groups to reinforce or resupply, or attempts to infiltrate from neighbouring countries," the BBC quoted the statement as saying.
Eid al-Adha begins Friday.
The government promoted several goodwill gestures as precursors to its announcement. State-run television showed video of men walking out from behind bars as part of the government's latest amnesty program for criminals, a commentator said.
"When [Brahimi] left Damascus, he didn't have a very solid agreement, but he did call on the government to start to initiate the ceasefire. He said the government should announce that it is halting its fire on its own, and the opposition would reciprocate -- and that is exactly what has happened," al-Jazeera reported.
Brahimi said Wednesday the Damascus government has agreed "in principle" to stopping violence in time for Eid al-Adha, which lasts four days. However, a Foreign Ministry spokesman told CNN the idea was "still under study," and a final decision would be announced Thursday.
The government's amnesty program came a week after rebel fighters told al-Jazeera they would agree to a proposed cease-fire only if the government released prisoners, ended its siege in Homs and stopped its air attacks.
Concerning the situation in Homs, Syria's state-run news agency said life in the embattled city had returned to normal and called for residents to come back.
"All their needs and necessities are now available, from security to supplies and food," the state-run Syrian Arab News Agency reported.
The Syrian Network for Human Rights reported at least 55 deaths, including two children, in Syria Thursday, 28 in Damascus and its environs, 14 in Aleppo, nine in Homs, two in Daraa and one each in Lattakia and Deir al-Zor.
Celebrity Couples of 2014 [PHOTOS]