President Trump announced Friday he has agreed to fund and reopen the government for three weeks, teeing up an end to the longest shutdown in American history. The government officially reopened Friday night when Mr. Trump signed the bill passed by Congress.

But hundreds of thousands of federal employees going without pay won't be paid immediately. There's a process for that.

So, here's what comes next.

Get Breaking News Delivered to Your Inbox

How the process to reopen government will go

The president has agreed to sign a three-week continuing resolution, meaning, legislation that funds the shuttered federal departments at current levels through Feb. 15.

Senate Minority Leader Chuck Schumer, speaking on the Senate floor, said the longest shutdown will end "today."

"We expect the continuing resolution to clear the House and be signed by the president today," Schumer said.

And the Senate passed legislation shortly thereafter. The House is expected to do the same.

It's unclear exactly when the president will sign the legislation, although he is expected to sign it before the day is out.

If that all happens as planned, thousands of federal workers would return Monday, if not sooner. Less clear is how long it would take for things like museums to reopen.

When federal workers will get paid

The short answer to how long it will take for federal workers to get paid is ... it's not entirely clear yet.

The president said federal workers will get back pay "quickly or as soon as possible." He has already signed legislation to give back pay to those who were furloughed or forced to work without pay.

A senior administration official said, "Recognizing the urgency of getting federal employees paid quickly, the administration is taking steps to ensure they receive pay as soon as possible. Since specific payroll issues vary by agency, employees can find more information about paycheck details by reaching out to their agency."

Sen. Susan Collins, a Maine Republican, said she expects federal employees to receive paychecks next week.

A Democratic Senate aide said the Congressional Research Office told Collins' office the agencies should be able to process paychecks within a few days after the continuing resolution is signed. That will include backpay.

The next scheduled paycheck for most federal workers is Feb. 8. That is the latest they would receive their first paycheck of 2019.

The Coast Guard, which is on a different pay schedule for active duty personnel, said it will take three to five days to get paychecks processed once a continuing resolution is signed.

Nancy Cordes, Nikole Killion, Andres Triay and Bo Erickson contributed to this report.