President Obama on Monday night signed a bill to ensure that military servicemembers get paid during a potential government shutdown.

Obama signed the Pay Our Military Act, “which provides continuing appropriations for pay and allowances during any period for which interim or full-year appropriations for FY 2014 are not in effect,” the White House announced in a statement.

The signing came with under two hours left for the House and Senate to reach a deal on legislation to avert a shutdown.

The bill covers members of the armed forces, including reserves on active duty and civilian personnel and contractors from the Departments of Defense and Homeland Security deemed to be “providing support to members of the Armed Forces.”

The president called congressional leaders on Monday night and urged them to reach a deal.

“The President made clear that Congress has two jobs to do: pay the bills on time and pass a budget on time. Failure to fulfill those responsibilities is harmful to our economy, small businesses and middle class families across the country,” the White House said in a readout.

House Republicans are using the continuing resolution to defund or delay Obamacare, but those measures have been rejected by the Democratically-controlled Senate. Obama has also vowed to veto any bill that blocks his healthcare reforms.