The deadline for a government shutdown closed in Friday night, and the Senate appeared far from a solution with only hours to spare.

Congress scrambled to reach an agreement before midnight Friday, when some government agencies will run out of money. A rush to break an impasse in the Senate appeared to yield little progress, even after Senate Minority Leader Chuck Schumer met with President Donald Trump at the White House in hopes of striking a deal.

Still, the Senate plans to vote at 10 p.m., ET, to end debate on a stopgap spending plan already passed by the House. If nearly all of the minority Democrats, and a few Republicans, oppose the legislation as threatened, it will all but assure that Congress will fail to pass a funding bill before the deadline.

Democrats and some Republicans have threatened to vote against a short-term deal, criticizing the continued use of stopgap bills rather than funding the government through more long-term, stable mechanisms. The minority party has also shown frustration about progress on talks toward a bipartisan immigration bill, which Democrats wanted to pass this week to protect hundreds of thousands of young undocumented immigrants from deportation.

The parties also remain divided over long-term defense and non-defense spending levels.

GOP leaders showed little optimism about a breakthrough hours before a shutdown would start. Republicans, who hold the White House, House and Senate, have put the burden on Senate Democrats to avert a shutdown.

Trump tweeted that the situation was "not looking good" for the military or border security at about 9:30 p.m. ET, two and a half hours before the deadline. He claimed that Democrats wanted to shut down the government to cover up what he called the "great success" of the Republican-passed tax law.

GOP leaders in Congress also were also hesitant about progress.

"There's no deal," Senate Majority Whip John Cornyn, R-Texas, said shortly before the planned vote, according to NBC News.

A deal was still possible before the midnight deadline, White House legislative affairs director Marc Short told reporters after 8 p.m., ET. Talks were ongoing at the highest levels of Senate leadership, but a deal on immigration seemed unlikely Friday, he added.

Hours before the deadline, Trump said he had an "excellent preliminary meeting" with Schumer. While both the president and senator cited progress, neither of them said they reached any kind of agreement.

@realDonaldTrump: Excellent preliminary meeting in Oval with @SenSchumer - working on solutions for Security and our great Military together with @SenateMajLdr McConnell and @SpeakerRyan. Making progress - four week extension would be best!

Only four people were in the meeting: Schumer, Trump, White House chief of staff John Kelly and Schumer's chief of staff, a White House official told CNBC. Senate Majority Leader Mitch McConnell, R-Ky., and House Speaker Paul Ryan, R-Wis., did not attend.

Kelly spoke with Ryan and McConnell in separate calls after the meeting, a White House official told NBC News. The chief of staff kept both Republican leaders in the loop, the person said. A Republican aide told CNBC that the president and Ryan spoke later that afternoon.

"We had a long and detailed meeting," Schumer told reporters at the Capitol after the meeting. "We discussed all of the major outstanding issues. We made some progress, but we still have a good number of disagreements. The discussions will continue."