HOUSTON -- Astros manager Brad Mills entered the press conference room at Minute Maid Park following Tuesday night's game and began praising his starting pitching, keeping with a script that he has used so many times in the past few weeks.

This time it was left-hander Wandy Rodriguez's turn to get some love, even if he wasn't able to finish the shutout like teammate J.A. Happ a night earlier.

Rodriguez continued his second-half dominance by yielding just two hits in seven scoreless innings, and he watched Hunter Pence hit a two-run triple and score in the fourth inning to lead the Astros to a 3-0 win over the free-falling Cardinals.

"Our starting pitching the last two or three weeks has been unbelievable," Pence said.

Astros starters have posted a 2.16 ERA in the team's past 22 games, a stretch in which the club has gone 14-8. Houston (61-71) has won eight of 10 games and 13 of their past 19 to get within 10 games of the .500 mark for the first time since they were 13-23 on May 15.

"The confidence has been building for quite some time," Mills said. "The way they had gone through those games in Philadelphia were big, especially the 16-inning game [Aug. 24], and I think it continues to build as we move on. The experiences they're getting have been invaluable."

Rodriguez (11-12) is 8-2 with a 1.65 ERA in his past 13 starts and has gone seven consecutive starts without allowing more than two earned runs. He earned career win No. 62, moving him past Jim Deshaies and into sole possession of third place in franchise history among left-handers.

"It's becoming a nice habit to be able to come to say our pitching did an outstanding job," Mills said. "Wandy's been throwing the ball extremely well for the last 2 1/2, three months, and he was outstanding again tonight. He mixed his pitches extremely well and was getting ahead of the hitters. It was almost textbook. Pretty close."

The Astros improved to 9-5 against the Cardinals this year and can earn a sweep in Wednesday's series finale. Houston went 17-12 in the month of August, its third consecutive month of playing at least .500 or better.

"It's a grind, and you know you're going to have ups and downs all season long," said closer Brandon Lyon, who saved his 10th game of the year. "You just try to find consistent baseball, and that seems to be what we've been doing as of late. If we're not pitching that great, our hitters seem to pick us up. And when we're not hitting, our pitchers are picking us up. That's what it takes over the long haul of the season to be a competitive team."

The Cardinals, who hadn't been shut out in consecutive games by the Astros since 1984, managed only five hits in the first two games of the series.

"I can't even believe it myself that we got five hits in 18 innings," said Cardinals first baseman Albert Pujols, who made inning-ending outs in the third and eighth with runners on base. "That's the way it is. It's not like we're taking something for granted. We're giving it everything that we can. You have a day like that and embarrass yourself. What can you do?"

Chris Carpenter (14-5) didn't pitch poorly for the Cardinals, outside of the fourth inning. That's when the Astros sent nine batters to the plate and scored the only three runs of the game.

Michael Bourn began the inning by reaching on an error and went to second when Angel Sanchez floated a single into center. Pence crushed a pitch over the head of center fielder Colby Rasmus and onto Tal's Hill. Bourn paused to see if the ball was going to be caught, and Sanchez was allowed to be more aggressive coming from first.

When the ball rolled up the hill and went around the flag pole that's in play, Sanchez was about three or four paces behind the speedy Bourn as they rounded third. Both runners scored, and Pence wound up at third base with a two-run triple.

"With a guy like Carpenter on the mound, you don't get too many opportunities to have first and second and nobody out, so really I was trying to get in there and be able to battle and find a way to get Bourn to third," Pence said. "That was my approach for the at-bat, and fortunately I was able to find a hole."

Chris Johnson stroked an RBI single to right field past a drawn-in infield one out later to score Pence and put the Astros ahead by the ultimate margin.

The Cardinals put the leadoff runner on base in the eighth on a walk issued by Tim Byrdak, but Wilton Lopez got three consecutive outs. He has stranded 28 of his 29 inherited runners this year -- the best percentage in the Majors.

Lyon gave up a leadoff double to Matt Holliday in the ninth and walked Skip Schumaker two outs later before striking out pinch-hitter Randy Winn to end the game.

"I was just fortunate to make a few pitches right there to get out of it," Lyon said. "The pitching to that point has been great, and Lopez coming in during a big situation in the eighth was probably a bigger situation since he had guys on and held them down. Obviously, I didn't want it to be [runners on base in the ninth], but a win's a win and I was able to get out of it."