The House of Representatives is expected to wrap up legislation on Wednesday to fund the federal government and allow President Barack Obama to implement his sweeping executive actions on immigration.

That leaves just one day in the Senate to pass the bill in order to avoid a government shutdown on Thursday at midnight.

That’s a problem, because in the Senate, nothing happens smoothly. Under Rule 22, any senator can force a 60-vote threshold and up to 30 hours of debate on any bill simply by objecting to a quick up-or-down vote.

There are two candidates for a potential filibuster that could force this scenario: Sen. Ted Cruz (R-TX) and Sen. Jeff Sessions (R-AL). Both have been screaming bloody murder over the fact that the House GOP bill fails to block Obama’s executive actions which would allow more than 4 million undocumented immigrants to gain three-year work permits. Both have rejected the House bill as weak and portrayed it as a tacit surrender, calling on their party to be willing to risk a government shutdown fight to block Obama’s moves.

Last week Cruz called on Senate Republicans to follow through on their promise to “do everything possible to stop President Obama’s illegal amnesty.” On Monday, his communications director, Amanda Carpenter, lashed out over the legislation that House Republicans were putting the finishing touches on.

Today is amnestibus week. It funds amnesty, Obamacare and everything else GOP has vowed to crack down on. Yep. — Amanda Carpenter (@amandacarpenter) December 8, 2014

Sessions criticized the House bill on Fox News Sunday, saying it “will allow the

President to move money around to fund his executive amnesty program.”

Spokespersons for both senators declined to comment Monday on whether they’ll force a drag-out debate before allowing the “cromnibus” — a combination of a continuing resolution on Department of Homeland Security funding and an omnibus bill for the rest of the government — to come up for a vote. If they do, there’s a real chance the government will shut down, if only for a few hours.

If they don’t, they risk falling victim to their own rhetoric of doing everything in their power to stop Obama from implementing his executive action.

The legislation is expected to clear the 60-vote threshold to eventually pass. Rep. Tom Cole (R-OK), an ally of Speaker John Boehner (R-OH), told Bloomberg TV he doesn’t think Cruz will be able to scuttle it. “No, I don’t think he’s got the votes to do it,” he said. “They’ll be actually bipartisan support for this and there will be bipartisan opposition.”

But Democratic leadership aides note that (even if they avoid amendments, which they hope to do) they cannot avoid multiple procedural votes and extended debate if one senator objects to fast-tracking the bill. And consenting to an expedited vote is a tough sell for Cruz and Sessions, who have vowed to use all the tools at their disposal to fight Obama’s “amnesty.”

One possible workaround would be for the House to pass a short-term continuing resolution lasting for a few days to avert a temporary lapse in funding. That might save some time, aides say, but even it would be subject to a debate that blows past the Thursday deadline.

Senate Democrats are hoping Cruz doesn’t go there.

“[A]t that point, he’s shutting down the government for a day, which seems insane even for him,” one senior Senate Democratic aide said.

The legislation would fund most of the government through September 2015, while funding the Department of Homeland Security only through March. Democrats prefer a full-year funding bill but many are open to the shorter-term idea to avoid a shutdown, as long as it doesn’t thwart Obama on immigration.

While leaders of both parties want to avoid a shutdown, there’s no foolproof strategy to avoid a temporary lapse in funding if Republican senators use the tools they have to stall. One House GOP leadership aide said of a short-term stopgap bill, “I have not heard it discussed.”

This article has been updated for clarity.