When Flavia Cabral leaves her first job at 5 p.m. to head to her second job at a midtown fast-food restaurant, she has no idea when she’ll see her family or even when she’ll get a full night’s sleep.

Flavia’s schedule — like that of 65,000 fast-food workers in New York City — is at the whim of her employer.

Fast-food chains aren’t required to provide hourly workers with reasonable advance notice of upcoming shifts — how many they’re getting or even when those shifts are.

A manager can call a worker who’s just gotten home and tell them to be back at work in an hour.

And if that conflicts with a scheduled doctor’s appointment for an elderly parent, or a parent-teacher conference? If the number of hours workers get isn’t enough to pay the rent or buy groceries? Tough.

File an objection, and your hours could be cut, or you could lose your job.

It’s no surprise children and families suffer. Kids in homes where parents have unpredictable schedules tend to do worse in school, and struggle to develop memory and communications skills.

Too many of Flavia’s college-age coworkers find that their best efforts to improve their prospects and opportunities continue to be thwarted. How can they afford or commit to attending college classes when they never know in advance how much they’re going to take home . . . or even when they can go home?

And at a time when two or more jobs are necessary for too many New Yorkers, unpredictable scheduling makes it that much harder to find a second job.

But Flavia and her co-workers have been fighting back.

Four years ago, a small group of courageous New York City fast-food workers walked off the job and sparked what grew into the international fight for $15 — a fight that was won earlier this year in our state.

Today, we are proud to stand with Flavia and fast-food workers to create change.

In the months ahead, we’re going to work with the City Council, advocates, labor groups, and the business community to create a law that helps provide fast-food employees with fair and transparent scheduling practices.

This law will require fast-food employers to post a schedule two weeks in advance. If hours need to be changed on short notice for reasons within the business’ control, employees must be appropriately compensated.

We’re also going to address the problem of “clopenings,” or shifts that require employees to consecutively work during closing and opening with fewer than 10 hours between them.

Treating workers with respect and fairness — and giving them the chance to pursue the American dream — lifts up all our communities, our city, and our country.

As Flavia says, without an education our young people are much more likely to get and stay in the same job she has now. “It won’t be a successful country,” she says, “if so many families can’t send people to school.”

She’s right.

Bill de Blasio is mayor of New York City and Héctor Figueroa is president of 32BJ SEIU.