As much as 17 percent of the American workforce—which means about 25 million people—have irregular work schedules. They work in shifts or are oncall, which means that employers can assign them to work just shortly before that work period begins. While employers have long used shift workers, in recent years, employers have increasingly used “just-in-time” scheduling. Under this arrangement, employees must be available to work, and it’s up to the managers to decide whether to use them based on business needs.

There are obvious benefits for this approach: It’s efficient, meaning businesses can avoid costs when workers aren’t needed. And businesses can respond when workers request last-minute schedule changes. But just-in-time scheduling can create problems, too. When shifts are added at the last minute, it can be hard for workers to make plans and to have a reliable income. For example, it can be difficult for working parents to juggle childcare arrangements if their work schedule is unpredictable.

Lawmakers have sought to discourage employers from using these arrangements through law and regulation. However, these well-intended efforts can backfire on workers, making it more likely that employers will reduce workers’ hours, and automate and consolidate their workforce in response to higher employment costs. These regulations also overlook how employees benefit from this flexibility. The best way to help workers is not to micromanage scheduling practices but to focus on job creation so workers can find employment relationships that meet their needs.