Weird wills

In fiction, it is a common trope that someone is left a fortune in a will, but there is some weird requirement that the beneficiary must fulfill, like spending a night in a supposedly haunted house, or working at a menial job for a period of time. Are such clauses in a will legally enforceable (anywhere)? Is there any limitation on how absurd the clause may be before the will is deemed invalid? For example, if I require my son to climb Mt. Everest alone or win the Tour de France before he gets my money, is he stuck with that requirement?

Thread that I started on the topic a few years ago:

In your Last Will and Testament, how much can you screw with your heirs?

The winner of the thread: The Great Stork Derby