If you wanted to watch the herd of Democratic presidential candidates in televised town halls these past few months, CNN has been the place to go.

Week after week, the cable network has given over an hour of prime time to a candidate seeking to challenge President Trump. On one town-hall-happy night last month, it devoted five hours to five of the candidates. A few of the 21 hopefuls have even been featured twice.

Unfortunately for CNN, not many people seem to want to watch televised town halls starring Democratic presidential candidates.

CNN began airing the made-for-TV forums during the 2016 campaign. The sessions spotlight one candidate in front of a live audience in a locale outside Washington. Audience members fire most of the questions at the candidate (hence, the “town” in town hall), with an anchor serving as emcee and occasionally lobbing follow-up questions.

Fox News and MSNBC have occasionally gotten into the act, too. But CNN has gone all in. Since January, it has staged 20 town halls, featuring both well-known candidates like Vermont Sen. Bernie Sanders and California Sen. Kamala D. Harris (both twice) to long shots like businessman Andrew Yang and self-help book author Marianne Williamson.

The network says the primary purpose is informational. “We host them because they create substantive conversations with the candidates that you’re not likely to have with a political anchor” in a conventional interview, said Sam Feist, CNN’s senior vice president and Washington bureau chief. “The setting is different, the questions are different, the answers are different. We think it’s a contribution to the [political] conversation.”

Both Feist and Mark Preston, CNN’s vice president of political and special events programming, say the goal is to provide a public service, not necessarily to boost CNN’s ratings.

In fact, the opposite has been true. CNN has drawn fewer viewers to its town-hall telecasts than to its usual prime-time lineup of news-discussion programs, which are themselves ratings-challenged. Only four candidates — Harris, Sanders, Sen. Elizabeth Warren (Mass.) and South Bend, Ind., Mayor Pete Buttigieg — have drawn more viewers than CNN averages on a typical weeknight, around 1.16 million people.

The rest, at least in television terms, have ranged anywhere from subpar to flaming disasters. Back-to-back town halls featuring Yang and Williamson drew about 310,000 viewers in April, far below the network’s modest 907,000 average for all the candidates.

None of its town halls has surpassed regular programming on cable rivals Fox and MSNBC.

Perhaps worse for CNN’s bottom line is that its town halls are relatively pricey to produce. Unlike a typical studio discussion, they require remote venues and remote production facilities, always an expensive proposition in television. Feist and Preston wouldn’t disclose figures but acknowledged the higher costs.

Which means, again in TV terms, that the town halls are a lose-lose proposition: A more expensive form of programming that has actually driven down viewership at a time when CNN is ramping up for the 2020 elections.

This may explain why CNN’s competitors have been reluctant to dive headlong into the town-hall business.

Fox News has staged only three such programs this year (with Sanders, Sen. Amy Klobuchar [Minn.] and undeclared independent candidate Howard Schultz). It has hedged its bet by moving each one out of prime-time hours, where Fox regularly rules the ratings (the Sanders town hall on Fox from 6:30-7:30 p.m. on April 15 still attracted 2.55 million viewers, the most of anyone this year across all networks).

Fox News will feature Buttigieg in a town hall on Sunday, only its fourth this year.

“Our attitude has been, ‘Let’s do some town halls but be selective about it,’ ” said Bill Sammon, Fox’s senior vice president of news. “There are two dozen candidates. We’re not going to get to all of them. That’s just reality. So let’s carefully select the promising candidates and space them out a bit. We’re not going to put them on every night or five in one night. We’ll do it every couple or three weeks and have an impact.”

On Tuesday, Elizabeth Warren said she turned down Fox’s offer of a town hall, saying she did not want to support a network she called “a hate-for-profit racket” in a tweet.

MSNBC, meanwhile, has done just one, with Sen. Kirsten Gillibrand (N.Y.) in March. It drew 1.24 million viewers. An MSNBC spokeswoman said the network is planning to air a town hall with Harris on May 28; she declined further comment.

CNN’s Feist and Preston say the value of its town-hall telecasts can’t be expressed in Nielsen ratings alone. Each event generates news coverage (including on rival cable networks) and attention on social media, they point out, which jump-starts the discussion of politics and burnishes CNN’s reputation as a leader in political coverage.

The biggest beneficiary of the format, however, may be the candidates themselves.

For example, political polling guru Nate Silver, founder of the news site Fivethirtyeight.com, declared Marianne Williamson “a major candidate” a few days after her CNN town hall.

Although Buttigieg’s appearance on CNN on March 10 was watched by just 545,000 people, it appears to have sparked a Buttigieg surge. When he returned for an encore town hall on April 22, Buttigieg had gone from unknown to solid contender (the second Buttigieg town hall reached 1.18 million).

CNN announced Monday that it will hold a town hall next week with former congressman Beto O’Rourke, whose struggling candidacy could sorely use the exposure. The network is still negotiating with a handful of Democratic candidates whom it hasn’t yet had on, including lesser-known ones such as Reps. Eric Swalwell (Calif.) and Seth Moulton (Mass.).

It’s also hoping to book perhaps the biggest name in the field, former vice president Joe Biden. A town hall with the leading candidate might be just the thing that CNN would like most: a big crowd watching.