Over the last two years, Alfredo Aceves has come to figure that opportunities work on their own time.

The last time he took the mound as a starting pitcher was June 2011 and it ended in a six-walk meltdown. From that point on, he was in flux, wandering from one nebulously defined role to the next, while it was clear he wanted to be a starter.

He didn’t hear opportunity’s knock again until this week, when Sox first-year manager John Farrell told him he’d start in the place of John Lackey, who had been placed on the 15-day disabled list with a strained biceps.

Having watched Aceves throw 55 pitches in his last outing against Toronto, Farrell’s hope was that Aceves could give at least six innings.

He worked five solid innings Thursday, giving up two runs on six hits, while striking out four. He downplayed his return to a role as a starter.

“We’ve got to keep working and try to play better, and whatever they tell me to do, I’ll do,” Aceves said.

His only true miscue was a 3-and-0 fastball to Chris Davis in the second that the Baltimore first baseman belted over the Red Sox bullpen. Otherwise, Aceves kept all crises to a minimum.

“He gave us five solid innings of work,” Farrell said. “But given his first start of the year, he kept the game under control. I thought he managed the lineup well, with the exception of the solo home run on the 3-0 pitch to Davis, I thought he worked his way around the lineup fairly well tonight.”

With Lackey on the mend, Farrell said Aceves will continue to fill in.

“Right now, he’s on line to make the next start,” Farrell said.