(Adds details on operations shutting down)
WASHINGTON, Jan 22 (Reuters) - Hundreds of thousands of federal workers began shutting down operations on Monday with the U.S. government closed and the Senate prepared to try again to restore funding, if only temporarily, and resolve a dispute over immigration.
As government employees prepared for the first weekday since the shutdown began at midnight Friday, U.S. senators were to vote at midday on a funding bill to get the lights back on in Washington and across the government until early February.
Support for the bill was uncertain, after Republicans and Democrats spent all day on Sunday trying to strike a deal, only to go home for the night short of an agreement.
Federal employees received notices on Saturday about whether they were exempt from the shutdown, White House budget director Mick Mulvaney said. Depending on their schedules, some were told to stay home or to go to work for up to four hours on Monday to shut their operation, then go home. None will get paid.
Senate Majority Leader Mitch McConnell said late Sunday that an overnight vote on a measure to fund government operations through Feb. 8 was canceled and would be held at 12 p.m. EST (1700 GMT) on Monday.
Up until Monday, most federal workers were not directly affected by the shutdown that began at midnight on Friday.
The federal Office of Personnel Management said on its website on Sunday night that "federal government operations vary by agency."
The Department of Defense published a memo on its website detailing who does and does not get paid in a shutdown and saying that civilian employees were on temporary leave, except for those needed to support active-duty troops.
The Department of Interior led by Secretary Ryan Zinke, offered no guidance on its website, which still had a Happy Holidays from the Zinke Family video near the top of the site. The department oversees national parks and federal lands.
The State Department website said: "At this time, scheduled passport and visa services in the United States and at our posts overseas will continue during the lapse in appropriations as the situation permits."
Markets have absorbed the shutdown drama over the last week, and on Monday morning world stocks and U.S. bond markets largely shrugged off Washington's standoff even as the dollar continued its pullback. U.S. stock futures edged lower.
The U.S. government has not been shut down since 2013, when about 800,000 federal workers were put on furlough. That impasse prevented passage of a needed funding bill centered on former Democratic President Barack Obama's healthcare law.
The problem this time focused on immigration policy, principally President Donald Trump's order last year ending an Obama program called Deferred Action for Childhood Arrivals (DACA), which gave legal protections to "Dreamer" immigrants.
The "Dreamers" are young people who were brought to the United States illegally as children by their parents or other adults, mainly from Mexico and Central America, and who mostly grew up in the United States.
Trump said last year he would end DACA on March 5 and asked Congress to come up with a legislative fix before then to prevent Dreamers from being deported.
Democrats have withheld support for a temporary funding bill to keep the government open over the DACA issue. McConnell extended an olive branch on Sunday, pledging to bring immigration legislation up for debate after Feb. 8 so long as the government remained open.
Senate Democratic leader Chuck Schumer objected to the plan and it was unclear whether McConnell's pledge would be enough for Democrats to support a stopgap funding bill.
Congress failed last year to pass a complete budget by Oct. 1, the beginning of the federal fiscal year, and the government has been operating on a series of three stopgap spending bills.
Republicans control both the House of Representatives and the Senate, where they have a slim 51-49 majority. But most legislation requires 60 Senate votes to pass, giving Democrats leverage.
Trump told a bipartisan Senate working group earlier this month that he would sign whatever DACA legislation was brought to him. The Republican president then rejected a bipartisan measure and negotiations stalled.
McConnell had insisted that the Senate would not move to immigration legislation until it was clear what could earn Trump's support.
Republican Senator Jeff Flake, who is involved in bipartisan immigration negotiations, said McConnell's statements on Sunday indicated there was progress in negotiations and he urged his Democratic colleagues to approve another stopgap bill.
(Additional reporting by Ginger Gibson and Damon Darlin; Editing by Peter Cooney and Jeffrey Benkoe)