In February 1798, Oliver was promoted to post captain and took command of the small frigate , escorting a convoy to Quebec. The following year he took command of the larger frigate operating in the Mediterranean and in 1802 he convoyed General Lord Hutchinson back to Britain. During the Peace of Amiens he was unemployed, but he returned to sea in 1803 as captain of the frigate , operating off the French coast until 1805, when he was sent to the Spanish coast to join the fleet under Vice-Admiral Lord Nelson at Cadiz. "Melpomene" was not engaged at the Battle of Trafalgar, but assisted in the aftermath of the battle by towing damaged prizes away from the battle site.