The dire warnings and the countdown clocks will start at any time now: Less than 30 days until the federal government shuts down!

But while Congress has only until April 28 to avoid a government shutdown — and will be on recess for two weeks in that period — lawmakers in both chambers and in both parties said they expected the budget battle to be resolved.

That's not to say there won't be fevered negotiations, doomsday scenarios and a deal struck, likely just in the nick of time.

"I don't know anybody who really wants a shutdown or thinks it would reflect positively on anybody," said John Cornyn of Texas, the Senate's second-ranking Republican leader. He pegged his confidence level on avoiding a shutdown at 8 on a 1 to 10 scale.

"I'm actually somewhat encouraged by what I've heard," Cornyn said.

A solution is no sure thing, but it would represent a rare bit of bipartisanship. That's because Republicans are likely to need Democratic votes to get the budget bills approved. In recent years, more conservative members of the House of Representatives have rejected last-minute, shutdown-preventing deals involving spending increases and bigger deficits.

"It's part of the negotiation," Cornyn said. "We'll see what can get bipartisan support in the Senate and what President Trump will sign."

Republican leadership may want to strike a deal to illustrate that it can govern, particularly after last week's epic collapse of the party's years-long effort to repeal President Barack Obama's signature health care law.

April 28 also would mark President Donald Trump's 100th day in office, and Republicans would like to spare him the embarrassment of a closure over an inability to extend a temporary spending bill. But any agreement that includes Democratic support is likely to mean that a number of Trump priorities, including big spending cuts and money for a wall at the border with Mexico, go unfulfilled.

The White House said Thursday that the spending cuts it wanted and a deal to keep the government open were not mutually exclusive.

"Obviously, we don't want the government to shut down," press secretary Sean Spicer said. "But we want to make sure that we're funding the priorities of the government."

Congress is supposed to approve spending with a series of a dozen bills, each covering a different subject area. Most of the appropriations bills for the 2017 fiscal year are nearing completion and a shutdown is unlikely because much of the work has been finished, said Rep. Mario Diaz-Balart, R-Fla., a senior member of the House Budget and Appropriations committees.

"Ultimately we have real deadlines and we're not going to let not meeting them happen," Diaz-Balart said. "They're Republican bills, but we need 60 votes. It's just a reality. Which means we're going to have to negotiate." The Senate needs 60 votes to limit debate on most legislation; Republicans control 52 of the 100 seats.

Some conservatives want the spending bill to include an effort to defund Planned Parenthood. The White House wants to fund part of the wall that Trump wants to build along the U.S. southern border.

Democrats, who don't want to be blamed for a shutdown but also don't want to give in to Trump, have put Republicans on notice that they'd balk at any so-called "poison pill" provisions, including money for the wall.

House Minority Leader Nancy Pelosi, D-Calif., who noted that Republicans have not been able to pass budget bills without Democratic votes, said the party wasn't opposed to other border security measures, including improved technology.

But she added, "The issue is spending billions and billions of dollars on a 2,000-mile wall or something like that. It's immoral, indecent and ineffective."

Senate Minority Leader Chuck Schumer of New York and other Senate Democrats warned Republicans in a letter earlier this month that any "poison pill riders such as those that roll back protections for our veterans, environment, consumers and workers" would result in a "Republican shutdown."

On Tuesday, Schumer told reporters that "things are working out pretty well. We are working well with our Republican colleagues, as we have in the past."