Oregon has approved legislation with bipartisan support mandating predictable work schedules for low-wage employees, making it the first state in the country to adopt the labor protection.

A bill approved by the state House Thursday and previously passed by the state Senate on bipartisan lines requires large employers in the food service, retail and hospitality industries to provide advance scheduling notice to their workers. It intends to guarantee workers greater freedom to plan their lives and spend time with family.

Oregon Gov. Kate Brown (D) plans to sign the measure in the coming weeks after a legal review, a spokesman said. The law will take effect in July 2018.

“Especially at this moment in the country, when Congress is trying to strip overtime protections and take us backward, it is inspiring to see policymakers in Oregon take this bold measure to finally update workplace standards for the realities of today’s work week,” said Carrie Gleason, director of the Center for Popular Democracy’s Fair Workweek initiative.

The bill would require employers in affected industries with 500 employees or more to inform workers of their schedules one week beforehand. The notice period would increase to two weeks in 2020. The law also mandates that workers receive 10 hours of rest between shifts, or else get paid an overtime rate of time and half for their work.

Although Oregon is the first state to pass “fair work week” legislation, New York, San Francisco, Seattle and Washington are among major cities that have enacted similar measures.

The legislation culminated a growing movement among labor unions and other progressive groups to scale back flexible scheduling practices that have taken hold in industries typically dominated by low-wage workers.

The most notorious of these practices is known as on-call scheduling, in which companies ask workers to keep their days open in case they are needed. It allows employers to call employees to work on a moment’s notice and send them home just as quickly based on business needs, effectively preventing workers from planning other aspects of their lives.

Six major retailers announced that they were abandoning on-call scheduling in December amid growing pressure from state attorneys general concerned it might conflict with existing labor laws.

In Oregon, the Center for Popular Democracy provided policy research and strategic advice to the Oregon Fair Workweek Coalition, which led the push for the new law. Key coalition members included the Oregon Working Families Party and the regional chapter of the United Food and Commercial Workers union.

The coalition pressured lawmakers to take up the issue by gathering enough signatures to make it a referendum on the ballot in the 2018 midterm elections.

They also won the support of Republican lawmakers and business groups by excluding manufacturing and other industries that depend on being able to change workers’ hours on short notice.

Oregon is a national leader in other progressive labor legislation. In December 2015, it became the fourth state to guarantee workers paid sick leave.