LOS ANGELES — Like most aspiring actors here, Eric Garcetti has a day job: he is president of the City Council, and he is openly pondering a run for mayor of Los Angeles.

But this week, Mr. Garcetti got a taste of the job on TNT’s drama “The Closer,” where he played, well, the mayor of Los Angeles. For the second time.

A speaking role on a hit show like “The Closer” might be a dream come true for some of Mr. Garcetti’s constituents, many of whom live every day looking for that big Hollywood break.

For Mr. Garcetti, the appearance may instead be a step on the way to finding a better day job.

While other potential opponents — like Austin Beutner, who stepped down as deputy mayor to focus on his campaign, or Wendy Greuel, the city controller — have to settle for, say, a fund-raiser in Venice or a meet-and-greet in the San Fernando Valley, Mr. Garcetti has, for a moment, a prime-time, national stage on which to look mayoral.