It is practically impossible without massively superior numbers to overcome a coastal fortification from the sea in that timeframe. There are some tools you can use, such as bomb vessels (ship-mounted siege mortars), but altogether, a battery protected by walls or berms always has the advantage over wooden ships.
The problem for the defenders is that the attackers usually have the advantage in numbers and mobility. Warships carried large numbers of guns and men - the broadside of a first rate could outweigh the entire artillery fielded by an army siege train. Bringing this to bear saferly was usually possible with enough time and knowledge of the land. A fortified battery was immobile, and outside the range of its guns - at best 3 miles, effectively much less - impotent. Depending on the situation, an attacker could circumvent it, blockade it, land guns to run a conventional siege, or send in raiding parties to try surprise assaults. Assuming this doesn't work, it's best to not try.
An example of the British doing it right
https://en.wikipedia.org/wiki/Battle_of_Havana_(1762)
And the Danish doing it wrong and losing a ship of the line and a heavy frigate to a shore battery of ten guns, six of them relatively light.
https://en.wikipedia.org/wiki/Battle_of_Eckernförde