Safeway worker MIchelle Flores is happy that she gets her schedule two weeks in advance now, but thinks other parts of the new rules aren't being implemented. (Lydia DePillis/The Washington Post)

San Francisco, the country’s premier laboratory for new Internet services, is also used to innovating in municipal regulation.

But in its latest experiment, it’s starting to find that legislating good corporate behavior isn’t as easy as pressing a button on your smartphone.

In July, the city started implementing a first-in-the-nation law aimed at curtailing the trend towards “just-in-time” scheduling, where managers call in employees to work on short notice. The new measure requires large chain retailers— such as Safeway and Walgreen’s — to publish schedules at least two weeks in advance, and to compensate employees with “predictability pay” if they make changes less than a week ahead of time. It also mandates that additional hours be offered to existing employees first before new hires are made, and that part-time workers be paid at the same rate as people who work full-time.

So far, it’s been easier to publish schedules than live up to the spirit of the law.

"The two-week notice seemed to be instituted right away, but the other stuff is lagging,” says Gordon Mar, director of San Francisco Jobs With Justice, a labor-backed group that pushed for the “Retail Workers Bill of Rights” and has been monitoring its implementation.

The sluggish response may be because fines don’t kick in until Oct. 3; the city is still hashing out the rules. But the spotty compliance so far highlights the difficulty of attempts to mandate worker-friendly practices — especially the kind that touch the most fundamental aspects of business operations, rather than those that simply require higher pay and better benefits.

San Francisco employers fought the new ordinance, but couldn’t prevent its passage. Now, they complain it’s impacting service.

“We’re hearing from members in San Francisco that it really is not working well at all,” says Ronald Fong, president of the California Grocers Association. Stores can’t always predict surges in foot traffic, which might be brought on a sunny day, leaving managers without the option to bring in more staff. That was a problem during the heat wave that swept over San Francisco this summer.

"Supplies weren’t able to get out to the shelves,” Fong says. "It just kind of snowballed, and our customers have a bad experience, or the stores lose sales.”

Some businesses don’t mind the rules in principle, but object to the red tape. "Everybody pretty much operates on a predictive schedule,” says Bill Dombrowski, president of the California Retailers Association. “But the process of implementing this, with offering the employees hours in writing and waiting three days for a response, it’s a lot of government intrusion into very minute detail.”

Also, not all industries schedule their workers in the same way. Milton Moritz is president of the National Association of Theatre Owners’ California and Nevada chapter, and says the theater business is by nature unpredictable, making the new law particularly difficult to comply with.

“We might not know until the Monday before the Friday a film shows, and even then we’re hiring, firing, scheduling people based on the business that film’s going to do,” Moritz says. “This ordinance flies in the face of all that. It really complicates the issue tremendously.”

The San Francisco ordinance hasn’t just been irritating for big companies. Some workers grumble the law discourages employers from offering extra shifts on short notice, because they would have to pay the last-minute schedule change penalty — even if workers would be happy for the chance to pick up more hours.

Rachel Deutsch, a senior staff attorney with the Center for Popular Democracy who has been helping local jurisdictions across the country craft fair-scheduling legislation, says that’s something that might change in future iterations.

"I think that’s the thing with any policy where it’s the first attempt to solve a complicated economic problem,” Deutsch says. "It’s been a learning process.”

So far, fair scheduling laws aren’t spreading as quickly as minimum wage and paid sick leave laws. A statewide bill in California failed a couple weeks ago, and no other local ordinances have passed besides San Francisco’s, though there are active campaigns in several cities including Minneapolis and Washington D.C.

Meanwhile, several companies have acted on their own to curb some of the practices that workers have found most disruptive, like on-call shifts, where workers have to be available even if they aren’t ultimately asked to work. But in some cases — like that of Starbucks, which committed to eliminating many of those practices — those voluntary changes haven’t been any more effective than government mandates.

Erin Hurley worked at Bath & Body Works and campaigned for an end to on-call shifts. After she left the job, parent company L Brands said it would stop the practice at Bath & Body Works as well as another of its chains, Victoria’s Secret. But Hurley says she’s heard from current workers that managers are still doing effectively the same thing, by asking employees to stay a little longer.

“On-call shifts were replaced with shift extensions,” says Hurley. “Basically what L Brands did was change the name of the practice.” Keeping people on-call is very convenient for employers, and letting it go can be easier said than done. (L Brands did not respond to a request for comment.)

Still, advocates in San Francisco think the Retail Workers Bill of Rights has already done some good, and will be more effective when the city’s enforcement kicks into high gear — just like overtime rules did, when companies got used to obeying them.

Take Michelle Flores, 21, who has worked part time at Safeway for two years to support herself while in going to college. Unpredictable schedules made that difficult: She would only know her shifts a few days beforehand, which sometimes didn’t leave her enough time to hit the books.

"I would study from midnight until 5, 6 a.m., sleep for two or three hours, and then go to the exam,” says Flores, 21, who attends San Francisco State. This year, she expects that to change. "If I know that I have a shift scheduled, I’ll just study another day,” Flores says.

Also, the law came with some funding for community organizations to make employees aware of what workers are entitled to. That has ancillary effects — like getting people interested in joining a union, which can be better equipped to make sure companies are following the rules.

“It just creates an opportunity to talk to more workers about their rights under the law, and that leads to conversations about other issues in the workplace,” says Gordon Mar, of Jobs with Justice. “And that could lead to getting organized.”