Cows don’t normally get a say in how they spend their days. The first milking often comes at dawn, where they form a cow conga line to their milking stations. Then comes feeding, then resting, then more milking (and perhaps a wander in the pasture, if they’re allowed to graze in open fields at all). Commercial farming operations repeat this cycle two to three times a day, with each cow having to abide by the farmers’ schedules, not their own.

But what happens when you leave it up to the cow to decide how often she wants to be milked, and whether she feels like eating, drinking, or simply relaxing?

Aðalsteinn Hallgrímsson and his brother Gardar own a dairy farm in northern Iceland, just outside the city of Akureyri. They know the answers to those questions—and others you’d never to think to ask—thanks to the robots they’ve installed in their barn.

In 2007, the Hallgrímssons rebuilt their barn from the ground up, spending kr160 million ($1.46 million) on technologies such as milking robots, an automatic feeding system, and cleaning robots. The investment quickly paid off, says Aðalsteinn’s son, Einar örn Aðalsteinnson. Within a year, their 80 cows were producing 30% more milk and the rate of infections had plummeted, cutting the farm’s veterinarian bills from kr2 million a year to under kr0.5 million.

Their success was because of one simple factor: The cows are much happier now.

When one of their cows wants to be milked, she walks to the center of the barn to one of the three self-milking Lely machines. She enters the machine—a gated, cow-size booth—and first has her teats inspected and cleaned. Next, the robot attaches its equipment to extract her milk while the cow chows down on some cow candy: tasty corn pellets supplemented with various vitamins and minerals. The whole process takes 10 minutes or less.

The door to the barn is left open unless the weather is bad, leaving the cows free to wander outside to graze in the pasture. If they’d rather, they can relax on their 2-inch-thick foam mattresses, which are lined up in a tidy row along one side of the barn. There’s a massage machine when they want to scratch that itch on their back, and fresh grass or hay is always available, delivered via an automatic feeding system. Robots scurry around cleaning the barn, with cow poop dispatched through slats in the floor to be automatically gathered as manure for the farm. An AC system, controlled by a weather station on the roof, automatically opens and closes the windows, ensuring fresh air (which is very important to the operation, says Einar). Another computer-commanded machine feeds milk to the baby calves.

The Hallgrímsson farm wasn’t the first to automate—computerized systems have been sold commercially since the early 1990s. But it was the first farm to install all this technology in one place, says Einar. Western Europe has led the way in adopting automatic milking systems, which have been slow to penetrate the US market. This is in part because herd sizes in North America typically number in the thousands, which makes the cost prohibitive.

As word of the farm’s robots spread, visitors started showing up to see the Icelandic cow shed. To accommodate the foot traffic, in 2011 Einar and his wife, Sesselja, decided to take the plunge together and open a restaurant.

Kaffi Kú, (literally Cafe Cow) is partly suspended above the barn with floor-to-ceiling windows offering aerial views of the cows. It specializes in dishes created with the farm’s products—such as beef goulash and burgers, and hot chocolate and pastries made using the cows’ milk—which provides the farm with another revenue stream.

All that equipment gathers reams of data on each cow—what time they were milked, the quality of milk from each teet, what vitamins or minerals they’re missing, how much milk they’re producing—arming their owners with a lot more intel on their herd. Einar says this allows them to get to know their cows far better.

“People always joke that farmers with this technology can go on vacation, but it’s more time consuming, not less,” he says. “The difference is that the farmers can spend all their time taking care of the animals. The job changes. It’s easier, and it’s a lot more fun.”

The cows have more fun, too. “They’re not tied up in the same stall for months on end. They interact with each other, have friends, a clear pecking order. You get to know their personalities and behavior.”

The robots’ success does mean there are fewer jobs for farmers. Einar estimates their current herd size of 150 would have required six farmhands before, but now needs only two.

So what are the answers to some of those original questions? In case you’re wondering, these cows like to be milked four times most days, versus the two times you see on typical farms. Oh, and they all have names. “It’s an old tradition,” says Einar, “but we’re having to dig deep now that the herd’s gotten so big.”