There was not much quality from either side in the first half. But after the break Aberdeen slowly got on top and Lewis Ferguson did well to win a penalty on 59 minutes which Sam Cosgrove comfortably converted. On 77 minutes fine play by McLennan set up Cosgrove who fired home from close range. After that Aberdeen completely dominated and Dundee keeper Seny Dieng had a number of fine saves to keep the score down.
Manager Derek McInnes made one change to the side that beat Motherwell on Wednesday night, Dean Campbell missed out through injury, so Greg Stewart came back into the starting XI.
This was a vital game for both teams.
Having lost their last six league games, Dundee are fighting for their lives at the bottom of the table whilst the Dons also needed the points to keep on track for third spot and a European place, a battle which may well go down to final game this season.
Niall McGinn took a knock in the opening minute but thankfully it was nothing too serious.
In the third minute fine play by Graeme Shinnie gave Connor McLennan space to run into and when he was taken down by Darren O'Dea on the edge of the area, Aberdeen had a free kick in a great position. It was a couple of yards in the from the junction of the box. Lewis Ferguson fired in a shot which deflected behind for the games first corner. That was cleared but the Dons kept the pressure on until McGinn's cross went harmlessly behind. Frustrating as Aberdeen had worked the ball into a good area.
Aberdeen were enjoying plenty of possession.
In the ninth minute Andrew Considine played a good ball forward for Sam Cosgrove who was inside the area but his first touch let him down and the ball went harmlessly behind.
From the goal kick Jesse Curran got the better of Considine and from the flick on John O'Sullivan got the better of Dom Ball, he got himself into a great position to pick out a blue shirt in the box but Ball did well to get back and recover the situation. The resulting corner was cleared but then Jesse Curran found space on the left, again though the cross was poor and McKenna was able to clear. A warning for the Dons though.
Dundee then gave the ball away inside their own half after a mix up. Max Lowe had space to run into but decided to put over an early ball looking for Stewart at the other side of the area and his cross in was way too strong.
On 12 minutes McKenna produced a fine solo run from the half way line which won a corner. McGinn floated it into the back post for the onrushing Cosgrove, but there?s a foul against the Aberdeen man.
After about 20 minutes Aberdeen forced a series of corners. McGinn put over some good balls, and the second corner saw Cosgrove knock a header back across goal, the ball landed at the feet of McKenna who managed to get a shot in but Cammy Kerr made a vital block.
On 24 minutes a Craig Curran shot from 30 yards never threatened Joe Lewis's goal and the ball went over. It was the first real shot of the game though. After 33 minutes the game was stopped for a while as Connor McLennan received treatment. Although he looked in some discomfort, he was able to continue.
Two minutes later Dundee came within an inch of opening the scoring. A Considine headed clearance from a cross landed at the feet of Ethan Robson. His left footed dipping volley curled away from Lewis but clipped the outside of the post.
Dundee kept the pressure on and Jesse Curran's cross was deflected behind for a corner. McKenna headed clear and Aberdeen were able to get themselves back up the park. On 37 minutes Darren O'Dea was forced off with an injury and had to be replaced by Genserix Kusunga. Dundee continued to enjoy a good spell and ask questions of the Aberdeen defence.
The Dons were getting drawn into a battle.
After 41 minutes the Dons appealed for a penalty as McLennan's cross into the area struck McGowan from close range. The ball appeared to hit his stomach and not an arm. As half time approached Ethan Robson, who had impressed in the first half, had a shot from distance which produced a routine save from Lewis.
There were three minutes of additional time played, and Aberdeen had their most dangerous moment in front of goal. McKenna had a half chance then Greg Stewart put over a great cross which hit off Kusunga, keeper Dieng got a touch before the ball was eventually cleared.
Half time: Dundee 0 Aberdeen 0
On 47 minutes a Shinnie cross forced Dieng off his line. The keepers punch was not convincing and landed at the feet of McKenna but his shot was rushed and always rising.
A minute later Ferguson had space to run into, he had options left and right, went himself and his shot was blocked. Then Aberdeen broke when Shinnie won the ball in the centre circle. He played it wide to Stewart but Ryan McGowan did well to prevent the ball coming over. On 50 minutes Ferguson took a quick free kick which set Stewart free on the left, although he slipped he still managed to get a cross over but Cosgrove could not get there.
On 53 minutes Cosgrove won a free kick 30 yards out after a tussle with Ryan McGowan. McGinn took it and the put the ball well over the bar.
The Dons needed a bit more quality in the final third.
On 55 minutes really nice link up play by O'Sullivan and Curran created a shooting chance for Callum Moore, the Dons defence did well to get out and make a block. The ball deflected behind for a corner. There was a lovely back heel from John O'Sullivan in the move.
A minute later O'Sullivan twisted and turned away from Ball, hit a shot from 30 yards which for a second appeared to be going in until Lewis tipped it over bar. It proved to be a vital save at a vital time - something Joe has done all season.
From the corner Aberdeen cleared and Lowe produced a fine ball forward to find Ferguson on the left. The midfield showed good composure to square up to Callum Moore and then when he went past the Dundee man he clearly drew a foul. Referee Andrew Dallas, who was well positioned, pointed to the shot. There was absolutely no complaint from Moore.
Sam Cosgrove took the responsibility and confidently put Dieng the wrong way.
Aberdeen had the break through.
On 61 minutes Ryan McGowan was booked for a foul on Cosgrove. Then a Shinnie cross from the right was flicked on by McKenna but the ball just went past the post. It was a fine glancing header but just needed a bit more on it.
On 65 minutes Stephen Gleeson replaced Niall McGinn. It led to a tactical change as the manager rightly adjusted to Dundee pushing players forward. A minute later a change for Dundee, Andrew Nelson coming on for Moore.
On 69 minutes Max Lowe was booked for a foul on Kerr. It led to a dangerous set piece but Considine won his header and then the whistle went for a foul. A minute later Gleeson played it wide to Shinnie on the right. The skipper curled in an excellent cross, but no one made a run. The ball in deserved better, someone should have got across their marker.
A minute later Kenny Miller replaced Craig Curran.
After 76 minutes Aberdeen grabbed a second. They worked the ball to McLennan on the left. The winger got himself one on one with Cammy Kerr. Although he was forced back initially Connor did brilliantly to get along the by-line and cut the ball back for Cosgrove who fired a first time low shot past Dieng. His 20th goal of the season.
On 80 minutes a lovely Aberdeen move found Ball on the edge of the area (not quite sure what he was doing there!), he flicked it into the path of McLennan and his shot was well saved by Dieng. The keeper also did well to get up and get to the ball ahead of Cosgrove who was lurking for his hat-trick.
With nine minutes to go Greg Stewart limped off and was replaced by Stevie May. A worry with the semi-final just a week away.
On 83 minutes Kenny Miller latched onto a long ball, he cut inside onto his left foot but fired well over. It was probably Dundee's best chance of the game and the experience striker will know himself that he should have done better after creating room.
After that Aberdeen looked the far more likely side to grab the next goal.
On 85 minutes May, again on the Dundee left, had space for a cross, his low ball beat the keeper but landed at the feet of a blue shirt. Then Shinnie from the edge of the area produced a good save from Dieng, his shot was creeping into the corner. Cosgrove headed the corner over the bar.
With four minutes to go McLennan was replaced by youngster Ethan Ross.
The keeper then also made a fine save as he tipped a Ferguson free kick onto the bar. Excellent effort from Lewis. He also saved Stevie May's 30 yard shot which was going in.
In the fourth and final minute of injury time Cosgrove from a corner got a shot away from close range, but it was well blocked by Kusunga. The Dons finished match well on top.