Say you’re a retail worker. You aren’t sure if you’ll be needed at the store tomorrow, but your employer wants you to keep your day clear just in case. You won’t know if you’re working until you call in that morning. The situation makes it nearly impossible for you to plan your day.

This practice is known as on-call scheduling, and it’s been coming under fire from worker groups and even state prosecutors recently. On Tuesday, six retailers agreed to stop the practice after they received inquiries about it from a group of state attorneys general. They join a growing number of retailers who have vowed to ditch on-call scheduling and give their employees more predictable hours.

Aeropostale, Carter’s, David’s Tea, Disney, PacSun and Zumiez all said they would stop requiring workers to call in each morning to find out if they’ll be working that day, according to New York Attorney General Eric Schneiderman, one of the top prosecutors who made the inquiry. Four of those retailers ― Carter’s, David’s Tea, Disney and Zumiez ― have also agreed to set schedules at least one full week ahead of time so that workers can plan around them.

In a statement, Schneiderman applauded the retailers for “stepping up to the plate” and leading by example.

“On-call shifts are not a business necessity and should be a thing of the past,” he said. “People should not have to keep the day open, arrange for child care, and give up other opportunities without being compensated for their time.”

The retailers couldn’t immediately be reached for comment Monday night.

On-call scheduling might conflict with New York state law, which is why Schneiderman had the leeway to hassle retailers about it. New York has a “call-in pay” statute that requires employers to pay workers for at least four hours if they have to report for work at all. That helps discourage companies from forcing employees to show up for work, only to tell them to go home because business is slow. A number of other states have similar laws on the books.

Last year, J. Crew, Urban Outfitters, Abercrombie & Fitch, Bath & Body Works, Gap and Victoria’s Secret also agreed to stop on-call scheduling after Schneiderman and his fellow attorneys general started asking questions.

Around 17 percent of U.S. workers have erratic schedules, according to an Economic Policy Institute report, and they’re employed disproportionately in low-wage fields like retail. A number of cities have moved to force businesses to offer workers more stable schedules. San Francisco passed what’s known as a “retail worker’s bill of rights” in 2014. Under that law, large retailers have to post their employees’ schedules at least two weeks in advance and must still pay them if their shifts are suddenly canceled without warning.