Mark Sanchez was putting his 17-month-old son to bed on Thursday night in Dana Point, California, when he noticed his cellphone lighting up with text messages.

The Jets had just used the third overall pick to draft Sam Darnold, a fellow former USC quarterback, to do exactly what they hoped Sanchez would do for them when they drafted him with the fifth overall pick nine years ago.

“Obviously, this draft has some parallels,’’ Sanchez told The Post over the phone late Thursday. “I was thrilled for Sam and his family. I’ve worked out with him a few times at USC and I know his family. I always root for fellow USC Trojans — especially quarterbacks.’’

Sanchez serves as both a cautionary tale and an asset as a learning resource for Darnold, because he’s lived this. He’s been thrown into the cauldron of pressure that comes with being the quarterback of a Jets franchise seemingly forever in search of its next Joe Namath.

The tone in Sanchez’s voice over the phone Thursday night ranged from genuine excitement for Darnold as a mentor wanting him to succeed, to a wistfulness that he wished he had another go at it in green to finish the job, bring a title to New York.

Most of all, Sanchez offered words of advice and encouragement for Darnold, with his life about to change forever.

“You’ve got to have the mentality that football is your No. 1 priority,’’ he said. “There’s nothing wrong with getting involved in the city and getting involved in the community and embracing New York and having fun and using all those resources to get your teammates together.

“But they’ve got to know that football’s your No. 1 (priority) and you’re working your butt off — just like I thought Nick Mangold, Brandon Moore, D’Brickashaw (Ferguson) and all those guys knew about me. No matter what anybody else would say, they knew that I cared about ball and I cared about my teammates and I wanted to win.’’

Sanchez, whose family always was by his side — his father, Nick, never missed a home game, and brothers Nick and Brandon were always close by — also had a message for Darnold’s family.

“I told his parents, ‘You guys have got to be his rock. After his big games and after the crappy ones, you guys have got to be there and strong for him, because New York is going to demand a lot from him — emotionally, physically, all that,’’’ Sanchez said. “I told them, ‘I guarantee he will get booed.’ It’s different than college. It’s a different atmosphere. It’s a different experience. I told Sam, ‘You’re going to love it, but understand that your life’s going to change.’’’

No one can predict how this will work out for Darnold and the Jets. Two years into Sanchez’s Jets career, he’d been to two AFC Championship games, had a 4-2 record in the playoffs and was the toast of the town. Four years later, after some coaching malpractice by Rex Ryan on the offensive side of the ball, Sanchez was gone.

Since being released by the Jets in 2014, Sanchez has been on four different teams and started just 10 games. Now at age 31, he’s searching for a new team with an impending four-game suspension for testing positive for a banned substance (he’s stated that he believes there was a contamination in the supplement he was taking) hanging over his head.

If there’s a moral to Sanchez’s story, it’s that nothing is guaranteed and that timing and circumstance have as much to do with a player’s journey as talent does.

Sanchez didn’t say this, but I will: Hopefully, the Mike Maccagnan-Todd Bowles regime will build a strong foundation around their talented USC quarterback instead of neglecting one side of the ball the way the defense-obsessed Ryan did, leaving Sanchez exposed and broken and gone from New York too soon.

“Sam has his work cut out for him, but I think he’s up for the task,’’ Sanchez said. “I think he’s primed for it. I told him, ‘This is your dream. You’re living it. Lay it out there, man. Don’t hold back with anything. Cut it loose and have a ball. Enjoy every second of it and make sure everyone knows your priority is that I’m here to play ball and I’m here to win.’ ’’

Sanchez has no doubt Darnold has what it takes to be the quarterback the Jets crave, but he also knows sometimes that’s not enough.

“He moves well in the pocket, he throws a great ball, he has that clutch ability, that X-factor, that moxie that everybody talks about,’’ he said. “He’s a different kind of leader (than me). He’s very stoic, he’s not super emotional, so maybe that will bode well for him.

“Sam’s got everything you want. But that doesn’t always mean it works out in the NFL. There are hundreds of quarterbacks that haven’t worked out or only have had marginal success.’’

Wise words spoken by someone who knows.