For the fourth time this year, the government is on the brink of a shutdown.

The House will vote on a "minibus" appropriations package on Friday, which includes funding for the Department of Defense, the Labor Department, the Department of Health and Human Services, and the Education Department, accompanied by a resolution to keep the government open until Dec. 7. It also includes nearly $9 billion in relief for areas affected by Hurricane Florence.

If the package of bills passes the House, there's one more hurdle before the government can truly be funded: President Trump's signature. But Mr. Trump is displeased with the bill because it does not include funding for the border wall between the United States and Mexico. Members of Congress are concerned that a presidential veto and a government shutdown could impact the midterm elections, giving Democrats even more leverage in their quest to retake the House.

Get Breaking News Delivered to Your Inbox

However, Mr. Trump believes that a shutdown could benefit Republicans before the midterms, since it may encourage Republican voters to turn out because they want a border wall.

"I happen to think it's a great political thing, because people want border security," Mr. Trump said on Rush Limbaugh's radio show in July.

Mr. Trump's views on a shutdown have wavered, in some cases from one day to the next.

Earlier in September, in an interview with the Daily Caller, Mr. Trump said "I don't like the idea of shutdowns." He added that he didn't "see even myself or anybody else closing down the country right now."

The next day, Mr. Trump reversed course in a meeting with Republican lawmakers.

"If it happens, it happens. If it's about border security, I'm willing to do anything," Mr. Trump said.

The president criticized the bill more vehemently on Twitter last week. "I want to know, where is the money for Border Security and the WALL in this ridiculous Spending Bill, and where will it come from after the Midterms? Dems are obstructing Law Enforcement and Border Security. REPUBLICANS MUST FINALLY GET TOUGH!" Mr. Trump wrote.

I want to know, where is the money for Border Security and the WALL in this ridiculous Spending Bill, and where will it come from after the Midterms? Dems are obstructing Law Enforcement and Border Security. REPUBLICANS MUST FINALLY GET TOUGH! — Donald J. Trump (@realDonaldTrump) September 20, 2018

Mr. Trump has requested $5 billion for his wall, but Republicans in the Senate do not have the votes to pass that amount of funding. The minibus sidesteps the issue by not addressing the wall at all.

The Senate passed the minibus last week, with only seven senators voting against it.

Some conservatives have expressed frustration that there is funding for Planned Parenthood in the bill, but not for the border wall. "This bill funds things we said we wouldn't, like Planned Parenthood, but doesn't fund things we said we would, like the border security wall. That's unacceptable," Jordan told the Associated Press.

The government was shut down for two days in January, and for a few hours in February. Mr. Trump threatened not to sign a funding bill in March, but did so hours before the deadline.

If the minibus bill is passed on Friday, the House is expected to cancel the two weeks of session in October, and reconvene after the midterm elections, on Nov. 13.

Rebecca Kaplan contributed reporting