Even top tech executives think they could be replaced by robots one day.

Alibaba founder and chairman Jack Ma, the man Fortune Magazine just named one of the world's great leaders, predicts that technology will make many CEOs irrelevant in the not-too-distant future.

"In 30 years, a robot will likely be on the cover of Time Magazine as the best CEO," Ma said in a speech over the weekend at an entrepreneurship conference in central China. And he warned of dark times ahead for people who are unprepared for the upheaval technology is set to bring.

Related: Chinese giant outbids U.S. rival for firm that handles Mexico money transfers

"In the next three decades, the world will experience far more pain than happiness," the billionaire said, adding that education systems must raise children to be more creative and curious or they will be ill-prepared for the future.

Robots are quicker and more rational than humans, Ma said, and they don't get bogged down in emotions -- like getting angry at competitors.

Related: Uber CEO: I need to 'grow up'

But he expressed optimism that robots will make life better for humans in the long run.

"Machines will do what human beings are incapable of doing," Ma said. "Machines will partner and cooperate with humans, rather than become mankind's biggest enemy."

That's a more relaxed outlook than that of another global tech leader, Elon Musk. The Tesla (TSLA) and SpaceX CEO said in 2014 that artificial intelligence is the greatest existential threat to humans, and he's now hoping to harness it in a way that will benefit society.

Ma's remarks come as Alibaba (BABA) continues to expand beyond its main e-commerce business. The company is a leading provider of cloud computing that has been pushing the power of big data and has expanded into digital media.

Related: Alibaba's 1 million American jobs promise isn't realistic

Ma predicts that technology will eventually create a problem plenty of office workers would love to have: a shorter work week.

"In 10 or 20 years, people will work less than four hours a day, maybe three days a week," he predicted. With less time spent working, he said, we will question how to live.

-- Nanlin Fang contributed to this report.