Washington (CNN) The House of Representatives on Wednesday approved a massive spending package that funds a large section of government and aims to avert a shutdown, just weeks before the midterm elections. The vote was 361-61.

The bill next heads to President Donald Trump's desk for his signature. While the President has given mixed signals on whether he will sign the bill -- due to its lack of money for a border wall -- Republicans have expressed confidence this week that he will sign the measure.

Trump himself said earlier Wednesday that he'll keep the government running.

"We'll keep the government open," Trump said at the end of a meeting with his Japanese counterpart in New York.

Trump must sign it by midnight Sunday to prevent a shutdown. The deadline marks the end of the fiscal year.

The bill includes a continuing resolution that will fund remaining unfunded parts of government until December 7.

Republicans and Democrats alike are hailing the bill as a success, as Congress has long struggled to pass legislation like this on time and before the start of the next fiscal year.

The package -- which groups multiple spending bills together in what's called a "minibus" -- was approved overwhelmingly by the Senate last week, but there still remains a degree of uncertainty whether the President will actually sign it.

But privately and publicly, Republicans say they're assured that he'll put his signature on it in the end.

House Speaker Paul Ryan expressed confidence Wednesday that Trump would not veto the bill and said that the President has told him he will sign it.

"Yes, I am confident he will sign it," Ryan told reporters during a news conference when asked if he had assurances from the President on the issue.

An official from the Office of Management and Budget told CNN that OMB held a call with all federal agencies earlier this week related to how those agencies would operate under a potential government shutdown. The call is part of the protocol required one week prior to expiration of appropriations, whether or not a shutdown is expected to be averted.

"I don't think anybody in the country has an appetite for a shutdown," said Rep. Chuck Fleischmann, a Tennessee Republican on the appropriations committee. Describing Trump as a "realist and pragmatist," Fleischmann said Trump realizes "what we have gotten done this year has been infinitely better than what we've done in years past."

The bill funds the military ahead of the September 30 deadline for the first time in years, as well as the departments of Labor, Education and Health and Human Services. In response to Hurricane Florence , lawmakers also added more than $7 billion in disaster aid. This comes on top of another minibus signed by the President last week.

Still, some areas of government will not get funding approved on time by the Sunday deadline. To prevent a shutdown, Congress attached a short-term spending measure, known as a continuing resolution, that will fund those departments until December 7.

Much to the President's irritation, however, the current minibus does not include money for his signature campaign promise of a border wall . The issue is essentially on hold for lawmakers to figure out before the December deadline, avoiding a controversial vote until after the November elections.

Republican Rep. Mark Meadows on Wednesday criticized the GOP strategy of pushing the fight over the border wall past the midterms.

"At some point you have to maintain and keep our campaign promises and at this point I fail to see the merits of this strategy," he told reporters.

But the North Carolina Republican nevertheless said that he does not expect there will be a shutdown as Congress moves forward with its current plan.

Meadows said that based on conversations he has had with the administration, he knows the President "doesn't want a shutdown," and said that he would put the probability of a shutdown occurring "at less than 5%."

Trump, speaking in Montana earlier this month about Republican leaders in Congress, said "they don't want to do anything to upset the apple cart."

"If it were up to me?" he continued. "I'd shut down government over border security. In a second."

But he went on to add he "most likely ... will not do that," noting he has a commitment from Republicans to address it "immediately after the election."

Top congressional Republicans have made clear to the President that the political fallout of a shutdown, even a small one, would be potentially devastating a little more than a month before the midterm elections.

Just days ago, however, Trump was again sounding off in a tweet , demanding to know where the money is for a border wall in what he called this "ridiculous" spending bill. "REPUBLICANS MUST FINALLY GET TOUGH!"

Adding to some of the uncertainty is a veto threat Trump made on the last major spending bill to avert a government shutdown. Despite his frustration, he signed the bill hours later.

Republicans, when asked if the President will sign this week, are quick to note the package contains funding for the Department of Defense, which falls in line with Trump's consistent call to rebuild the military.

Rep. Mac Thornberry, a Texas Republican and chairman of the House Armed Services Committee, told reporters on Tuesday that signing the bill would be the "biggest single step" in meeting that goal, and Trump's frustration with the wall ultimately "won't override the achievement part of this."

"I want his signature on that dotted line," he added.

Once approved by the House on Wednesday, as expected, the bill will likely reach the White House on Thursday, which is shaping up to be a busy day. A follow-up hearing is scheduled with Trump's Supreme Court nominee Brett Kavanaugh and Christine Blasey Ford, the woman who accuses Kavanaugh of sexual assault in the 1980s when both were teenagers (Kavanaugh has denied the allegations).

Also on Thursday, Trump is slated to meet with Deputy Attorney General Rod Rosenstein, whose future appears shaky after he offered to resign.

The President will have until Sunday night to sign the package. But with House GOP leaders considering leaving town this week until after the election, there will be an emphasis on the President signing the bill by Friday, aides say.