In the gig-economy era where flexible work schedules have become the norm, certain cities like Chicago and Seattle haven’t got the message. In July, Chicago passed a predictive scheduling law, which makes employers post their schedules well in advance for hourly workers and then fine or penalize employers for making any changes to the set schedules. While the law is well-intended, the results are disastrous, according to a new study by the American Consumer Institute.

The study estimates that predictive scheduling regulations, if adopted nationwide, would make business operations more costly, reduce economic output by $44 billion, and lead to nearly one-half million fewer jobs. It may also encourage the adoption of automation, including self-checkout kiosks.

If cities are serious about protecting jobs, they should avoid predictive scheduling at any cost.

Upfront, predictive scheduling seems like a plausible relief for employees, especially those working in the service industry. However, predictive scheduling doesn’t allow employers to add or change shifts and penalizes businesses for calling workers on short notice. But is this approach even compatible with the younger generation’s expectation of a flexible work environment?

As millennials now constitute the largest share of the workforce, flexible work schedules have become one of the hallmarks of the millennial work culture. From ridesharing to the gig economy, the nature of work itself is expected to be adaptive, allowing people to switch jobs and shifts quickly and easily.

But aside from the societal backlash from millennials, predictive scheduling won’t help working conditions.

A study by the Employment Policy Institute looked at the effects of predictive scheduling in San Francisco and found that predictive scheduling forced 21 percent fewer businesses to offer part-time positions and 19 percent of businesses would schedule fewer employees per shift. But perhaps the most ironic effect found was that 35 percent of businesses gave employees less flexibility to make schedule changes.

But predictive scheduling doesn’t just hit employees. Restaurants, for example, would face serious financial setbacks under predictive scheduling mandates.

Restaurants rely on workers who are eager to pick up and trade shifts. Nine out of 10 restaurants have 50 or fewer employees, which means it doesn’t take much for a couple of employees to call in sick for there to be a shortage of workers on a shift. Some predictive scheduling laws won’t allow a restaurant to “call in” a worker within a 72-hour notice without the employer receiving extra pay.

In other instances, employees receive at least 50 percent of their pay for canceled shifts, despite not working at all. But should restaurants be punished for factors, like a slow lunch, which are outside their control?

Sixty percent of restaurants fail in the first year of opening and 80 percent by the fifth year. With labor accounting for around 30 percent of a restaurant’s cost, predictive scheduling increases the likelihood of failure as restaurants already have razor-thin profit margins (normally at 3-5 percent). Although predictive scheduling aims to protect workers, at least in theory, it threatens the very survival of many businesses, as restaurants will look for any reason to cut costs, including labor.

A study by the National Bureau of Economic Research found that as labor costs increased, so did automation. Already major companies like Uber are pushing for completely autonomous vehicles while major fast-food chains like Carl’s Jr. are adopting automation to reduce business costs. If the costs of employing a person continue to increase, finding robotic replacements is the logical choice, which is the last thing any worker wants.

Predictive scheduling sells a false bill of goods to both employees and employers. Current workers will find themselves with less flexible schedules and fewer hours while businesses will have to put a halt accommodating employee requests for short-term scheduling changes.

While hiring people becomes more difficult and costly, machines are becoming more appealing to businesses. As cities like Chicago attempt to help workers, they might end up giving their job to a machine instead.