Hmmm, I seem to remember Jan Dodonna chose to stay behind on Yavin IV and activate the self-destruct mechanism, because the probability of surviving was slim. Part of the reason was because he had just lost his son. That would effectively place the Executor shortly after the Battle of Yavin.
Let me look that one up ......
EDIT: Yes, although not quite the way I said it, he did remain on Yavin IV to blow up the base. This was before a full year had passed after the Death Star was destroyed, during the evacuation of Yavin IV. That's 2 years prior to Hoth.
The Executor was launched some time between 6 months after B.B.Y. and the evacuation took place.
Vrad Dodonna died after
the ship was finished. The Executor suffered damage to it's shield systems which had to undergo repairs before it was brought into action against the rebels at Yavin IV. It also suffered engine damage from a blast from the Millinuim Falcon after Han picked up Luke on the astroid Vrad had left him on. Vrad tried to defect, but came under fire from the Executor who was hunting him and Luke. Realising he couldn't escape he turned around and flew straight into the Executor. This alone is not enough to take down the Executors shields of course, but on the tip of his ship I believe he had an ancient artifact of tremendous power. The Executor commander had to rearrange it's rear shields forward in order to take the blow. Vrad almost succeeded in taking it out. Meanwhile, the Falcon had slipped unoticed up on them from behind and crippled it's unprotected engines system somehow. I forget how.