Wrexham left it late to beat Peterborough United on Saturday to keep pace in the race for automatic promotion in Phil Parkinson's 1000th game as a coach.