Officials in West Palm Beach, Fla., are playing continuous loops of children's songs to keep the homeless from sleeping on the patio of a city-owned banquet facility.

The city began playing "Baby Shark" and "Raining Tacos" three weeks ago outside the glass-walled Waterfront Lake Pavilion in an effort to keep the area clean, Mayor Keith James told Fox News.

"Workers in the morning were finding some unsanitary things, including human feces, around the Lake Pavilion," he said.

The facility hosted 164 events from June 1, 2018, to June 30 of this year, almost half of which were weddings, The Palm Beach Post reported. The hall brings the city about $240,000 in revenues annually.

“People are paying a lot of money to use the facility,” Parks and Recreation Director Leah Rockwell told the paper. “Thousands of dollars. We want to make sure people paying this money had a facility that was clean and open and continue to use it in the future.”

More and more homeless people have been seen bedding down on the Pavilion's elevated patio, prompting the city to act. City parks and other public spaces have seen an increase in the homeless population, prompting concerns from residents and business owners.

It got so bad James said he couldn't take his children to the park because it had essentially been taken over by the homeless.

Will the strategy work?

Illaya Champion, a homeless man, told the paper the music won't bother him.

“I still lay down in there," he said. "But it’s on and on, the same songs."

But the tactic has paid off so far, Rockwell said.

“It has been effective and is a temporary measure to make the area accessible for those who have rented the facility and for future events," she said. "We are not forcing individuals to stay on the patio of the pavilion to listen to the music. The music is heard only if you are on the patio, a very small area relative to the rest of the waterfront.”

CLICK HERE TO GET THE FOX NEWS APP

The city has tried weaponizing music before. To get rid of drug dealers, the police played classical music through rooftop speakers in protective casings, James said. The electrical cabinet that powered the speakers was eventually smashed.

The new strategy is not meant to be a permanent solution to address the influx of homeless in the city, James said. To that end, the city partners with nonprofit groups and engages with the homeless to get them much-needed services.

"It's not meant to be the Band-Aid, the cure-all," James said.