A poor first period only came to life midway through the half when Mark Crossley made two superb saves in a minute, firstly to deny Adebayo Akinfenwa and from the ensuing corner he did well to keep out a header from Poul Hubertz.
Coke went close just before the break after being put clear by Akinfenwa but shot wide.
Coke made amends six minutes after the restart when his deflected shot beat Crossley.
Gilligan increased Northampton’s lead in the 63rd minute when he raced clear – Crossley saved his initial effort but he volleyed home the rebound.
Jackman had a late effort cleared off the line by Stefan Stam while Oldham’s only real effort saw Kelvin Lomax foiled by Mark Bunn.