SALEM – A Lynn man who admitted he robbed the Essex Street Market three times over a two-month span last year is headed to state prison for five years.Joshua James Cunningham, 27, of 111 Marianna St., pleaded guilty Friday in Salem Superior Court to three counts of armed robbery while masked before Judge John T. Lu.Cunningham was sentenced to serve five years in state prison to be followed by two years of probation.The judge followed the agreed recommendation offered by Assistant District Attorney Jean M. Curran and defense lawyer Christopher Norris.The first incident occurred Oct. 2 at about 4:30 p.m., when Cunningham, wearing a black leather jacket, a red baseball hat and scarf over his face to conceal his identity, walked into the Essex Street Market, located at 99 Essex St., wielding a knife and demanding cash from clerk and fled with an undisclosed amount of money.Nearly four weeks later, on Oct. 24, he returned to the same market at around 4:30 p.m., demanded money at knifepoint and left the store.Then, on the afternoon of Dec. 14, he went back to the store and again at knifepoint stole approximately $80 from the cash register.