Cory Schneider has played in so many low-scoring games this season his coach compared the goaltender to a pitcher who needs a shutout to win.

“We don’t give him a lot of run support and I think he’s starting to get used to that,” Devils coach Pete DeBoer said. “He’s figured it out that he has to pitch a shutout.”

Schneider made 26 saves for his third shutout of the season and Michael Ryder scored his fourth goal in five games to lead the Devils past the Stars 1-0 on Thursday night at the Prudential Center in Newark.

Schneider came up with his biggest save in the closing seconds when Tyler Seguin of the Stars put one on net, but he turned it away to clinch the game and end the Devils’ three-game losing streak.

“Even with 8 seconds left, they can still come up the ice and make something happen,” Schneider said. “Fortunately, I was able to stick that one away and it didn’t hit my guy and go in. Winning is always better, no matter how it happens, 5-4 or 1-0.”

Schneider earned his first victory since Dec. 28 against the Islanders. Schneider’s previous shutout was also a 1-0 victory against the Sabres on Nov. 30. He also blanked the Rangers in October.

Ryder, who scored 35 goals three seasons ago while playing for the Stars, netted his team-leading 15th on a pass from Travis Zajac.

“I went through a little stretch there where the puck wasn’t going in and I just stuck with it,” Ryder said. “If you keep shooting, eventually you’ll find the back of the net. It’s going in for me now.”