In this Nov. 6, 2014 photo, Meijer employee Brent Lovelace straightens shelves in Kokomo, Ind. (Tim Bath/AP)

Hail the lowly bar code. By enabling retailers to track sales and inventory, it allows them to order goods from warehouses and manufacturers only when needed, reducing overhead and costs. Just-in-time production is a signal achievement of our digitized age.

Just-in-time labor is not. Millions of retail workers are routinely summoned to their workplaces with little more advance warning than their employers accord the truckloads of goods or food those workers sell. Unlike those products, of course, workers have lives. They have kids to get to school or put in day care, families to cook for, courses to take, other gigs to report to, promises to keep. They can do all that if they have regular schedules, but such schedules are often hard to come by.

A recent study by the University of Chicago’s Susan Lambert reported that 41 percent of young (ages 26 to 32) hourly workers get their schedules a week or less in advance, and that “in the course of a single month, workers’ hours varied on average by 37 percent in comparison to what they considered their usual hours.”

Regular hours were once a cornerstone of Americans’ work lives. They were a feature of the union contracts that covered a third of the workforce in the decades following World War II. But as unions have vanished and workers suffered a loss of power, thousands of employers have taken to summoning their employees — or telling them to wait, unpaid, until they are either called in or told not to report — with scant regard for such hoary concerns as the workers’ familial obligations. In recent years, as low-end retail and restaurant gigs have led the list of newly created jobs, the number of workers subjected to such existential constraints has increased.

Now, one city has decided to help such workers gain more control over their lives. Last month, San Francisco’s Board of Supervisors unanimously adopted a Retail Workers Bill of Rights. The new ordinance requires employers to schedule their workers’ hours at least two weeks in advance, though it makes allowances for schedule changes beyond the employer’s control. It also requires employers to pay workers for hours they spend on call only to have their shifts canceled and to offer their part-timers more hours before they seek to hire new workers.

For nearly half a century, since the hippies first flocked to Haight-Ashbury, San Francisco has been associated more with cultural and lifestyle liberalism than with such New Dealish concerns as advancing workers rights. In recent years, however, the city has staked its claim as a champion of workers’ interests, much as it did in the 1930s, when a general strike actually shut the city down. In November’s election, city voters overwhelmingly approved raising the minimum wage to $15. In recent years, the Board of Supervisors mandated paid sick leave and required employers with more than 20 workers either to provide them with health insurance or pay into a fund offering coverage to the uninsured.

Thanks to Silicon Valley, San Francisco is not merely a liberal city but also a wealthy one, economically able to legislate social guarantees at levels that many other cities and states cannot match. There’s nothing peculiarly left about its desire to help beleaguered workers, however. Last month, San Franciscans were joined by the voters of Alaska, Arkansas, Nebraska and South Dakota in raising their respective minimum-wage standards — albeit not to San Francisco’s $15 level. Similarly, there’s nothing distinctly San Franciscan about a law that requires employers to let their workers know their hours far enough in advance so they can plan their schedules.

A bill requiring all U.S. employers to do just that, in fact, has been introduced in both the Senate (where it has six sponsors) and the House (where it has more than 40). The Republican Congress that takes office next month is no more likely to enact such legislation than it is to mandate collective farms. For Democrats, however, this is just the kind of cause they can invoke not just to rally young and minority voters but also to appeal to the common sense of most Americans, who understand that workers are not products to be summoned at a moment’s notice. As Democrats regroup from November’s debacle, they should develop and promote a Workers’ Bill of Rights ensuring the kinds of basic guarantees that Americans secured many decades ago and, for a time, took for granted.

Read more from Harold Meyerson’s archive or follow him on Twitter.