| 29 Nov 2017 | 11:18

When the going gets tough, Mayor Bill de Blasio gets going — as far away from City Hall as politically, geographically and logistically possible.

It’s been a four-year pattern. And now, even as his administration reels from a mushrooming scandal at the New York City Housing Authority (NYCHA), it is about to repeat itself:

The mayor next month packs his bags for Iowa, home of the first-in-the-nation caucuses — and graveyard-in-the-cornfields for outsized dreams and overreaching politicians.

Fresh from his reelection triumph and two weeks before his swearing-in for a second term, he’ll headline the fifth annual holiday party for the liberal advocacy group Progress Iowa in Des Moines on December 19th.

It is the classic testing-the-waters event — one that Bernie Sanders keynoted in December 2014 as he geared up for his 2016 presidential bid.

“Welcome back to Iowa,” said Matt Sinovic, the group’s executive director and a “BBQ sauce competitor” at the Iowa State Fair. He said the mayor’s “progressive leadership and passion for common-sense solutions provides a model for the entire country.”

Perhaps. But at the largest public housing authority in America, the home of one out of every 14 New Yorkers, there’s been a spectacular lack of common sense. Not to mention absence of compassion for the vulnerable. Even disrespect for the rule of law.

It turns out that NYCHA over a four-year period failed to conduct lead-paint safety inspections in thousands of its apartments as mandated by state and federal laws, then lied about it by submitting false claims, the city’s Department of Investigation revealed in a November 14th report.

Not atypically, de Blasio was enjoying a week-long, post-election family vacation in Connecticut when the news broke — but that didn’t deter him from mounting a strong defense of NYCHA’s embattled chair, Shola Olatoye.

After 24 hours of silence, and an initial refusal to address what DOI termed “systemic mismanagement” at her agency, the mayor took to Twitter on November 16th to say Olatoye is “turning NYCHA around” and “she isn’t going anywhere.”

Now, consider that the mayor had just praised an apparatchik whose blunders had put tenants, mostly children, at risk, and who had falsely and knowingly certified in federal documents that lead-paint inspections had been carried out, even though she knew that wasn’t the case, according to DOI Commissioner Mark Peters.

It got worse: “POISON BILL,” screamed the Page One headline in the Daily News on November 19th. “Blaz knew,” the story said with tabloid succinctness. It disclosed that for more than a year, the mayor had concealed from the public and 400,000 public housing tenants his knowledge that NYCHA was violating the law by failing to perform inspections designed to protect kids from lead poisoning.

By November 20th, the mayor was back from Connecticut, and at a press conference in Queens, he acknowledged he was “angry” and “frustrated” and “never wants to see anything like this happen during my administration.”

All at-risk apartments had been belatedly inspected and remediated as of June, he said. “Personnel changes” had forced out two senior managers. A third was demoted.

But he also blamed the Bloomberg administration, saying lapses in inspections began in 2012. And he continued to heap praise on Olatoye, saying she was “absolutely part of the solution at NYCHA.”

Let’s take a step back: NYCHA was created in 1935 to offer safe, decent and affordable housing to low- and moderate-income New Yorkers — exactly the citizens de Blasio vowed to champion in 2013 as the candidate of the have-nots who would reverse income inequality and restore affordability.

Instead, it is those residents — living in 176,066 apartments in 326 public housing buildings, including 97 in Manhattan — who are now the victims of the NYCHA scandal. Their landlord? The mayor of New York City.

Yet it is de Blasio, self-styled fighter for the dispossessed, who will be feted in the Hawkeye State. As Sinovic put it in a statement, Progress Iowa is eager to hear his take on the future of a movement to “ensure working families get a fair shot at success.”

So de Blasio, now term-limited and technically a lame duck, is changing the subject to burnish that image: Before addressing the NYCHA scandal on November 20th, he took to online publishing platform Medium to unveil the Iowa trip, writing that “fighting for New Yorkers doesn’t end at the edge of the five boroughs.”

No, he insisted at the Queens press conference, he’s not running for president. But he’ll travel out of town when he’s needed, for instance, to support Democratic efforts to retake the House and Senate in 2018.

“This is who I am,” he said defiantly. “This is what I’m gonna do.”

So take him at his word. It’s indeed who he is. In times of crisis, he hits the road: Among his 2017 destinations:

* Atlanta in February. Backing a fellow progressive and bucking his party’s establishment in the race to chair the Democratic National Committee, he jetted off to the DNC winter meeting — but came away empty when his candidate lost. He’d been grilled by then-Manhattan U.S. Attorney Preet Bharara hours earlier over his campaign’s sketchy pay-for-play fundraising practices. No charges were filed.

* Miami Beach in June. Traveling with first lady Chirlane McCray and a dozen city officials, he checked into the Fontainbleau Hotel to address the U.S. Conference of Mayors. The scheduled expiration of mayoral control of public schools was just days away, and critics rapped him for leaving town with the outcome unclear and a pitched battle still raging in Albany.

* Hamburg, Germany in July. Arguing that America is ill-represented by President Donald Trump abroad, the mayor demonstrated at a rally of global leftists at the Group of 20 summit. Police Officer Miosotis Familia had been assassinated in the Bronx the day before, cops were enraged about the trip, and Ed Mullins, head of the NYPD sergeants union, said, “As the city mourns, its leader flees.”

* Rhode Island in August. Taking a week-long family vacation on the eve of a major election is rare enough, but de Blasio did so just days after coming under fire for claiming he faced a tough, “competitive” race so he could score $1.6 million in public matching funds from the city’s Campaign Finance Board. His victory margin? A landslide 39 percent.

As for the latest out-of-town excursions, well, New Yorkers had a few choice words for his timing: “What about the lead poisoning you’ve covered up for the past year?” tweeted @dang90, the handle of Daniel Girdusky, on the mayor’s Twitter feed. Added @Spratterz, also known as Kate Spratt, “Yea, it’s going to Iowa during the lead-paint mess.”

Give the last word to @MyGlassBagel, the handle for Darrius Andorrus, who posted, “You are the mayor of New York City. Nothing more. Stop your pitiful overreaching.”