President Donald Trump tweeted that he was "looking forward" to Friday's May jobs report an hour before its release.

As president, Trump receives the jobs report the night before it comes out.

An Office of Management and Budget rule mandates that executive-branch employees avoid commenting on the report until an hour after its release.

Former economic officials took Trump to task over the tweet, while members of the Trump administration defended it.

President Donald Trump may have violated a decades-old federal rule by tweeting about Friday's May jobs report about an hour before its release.

The president is privy to the report's data the night before it is made public.

"Looking forward to seeing the employment numbers at 8:30 this morning," Trump tweeted.

Under guidance released by the Office of Management and Budget (OMB) regarding data releases, members of the executive branch are not supposed to make public statements about the data until an hour after the report's release.

Austan Goolsbee, who served as chairman of the Council of Economic Advisers under President Barack Obama, said Trump's tweet was clearly in violation of the rule.

"If the president just tipped that the numbers are good, he broke the law," Goolsbee tweeted.

"It's classified information," he continued. "The CEA gets the number the day before and even internally can only discuss the info on an encrypted line before release."

The jobs report, when it was eventually released, beat expectations with 223,000 jobs added in May. This was higher than the 190,000 expected by economists.

Jason Furman, another CEA chair under Obama, asserted that Trump should be disqualified from getting the information before release.

"You should have gotten the employment numbers from the Council of Economic Advisers yesterday," Furman said. "And if this tweet is conveying inside information about a particularly good jobs number you should never get them in advance from the Council of Economic Advisers again."

The White House press secretary, Sarah Huckabee Sanders, confirmed to CNBC that Trump received the jobs-report numbers on Thursday night but insisted that the tweet was acceptable because the president "didn't put the numbers out."

Larry Kudlow, Trump's top economic adviser, also defended the president's tweet.

"I don't think he gave anything away," Kudlow said during an appearance on CNBC.

This is not the first time the Trump administration has appeared to break the rule. Sean Spicer, then the White House press secretary, tweeted 27 minutes after the jobs report was released in March 2017. It's unclear whether there was any penalty for that tweet.