Maybe there's a clock on Earth with a microcontroller and some kind of UPS or battery backup or large capacitor backup?
You could argue that the timekeeping of TAI (https://en.wikipedia.org/wiki/International_Atomic_Time) could be seen as a distributed computation (where different entities are counting the same value and running manual and automated protocols to keep the value synchronized), and that has been running since 1972. It almost certainly hasn't been running continuously on any individual hardware device, but there have always been devices that represented its value and always been efforts to maintain continuity between calculations.
Although I guess the same logic could argue for civil timekeeping in any calendar, because people have actively tracked it as "the same computation" and cared about it for centuries or millennia. Maybe the distinctive argument for TAI is that it's presumably been continually represented digitally in programmable computers since 1972.
I think it would make more sense to measure the longest computation in the number of cycles executed rather than in seconds. If I'm not mistaken, Voyager 2 had a processor running at 4MHz. So a modern 2 GHz processor will execute more cycles in a couple months than a 4MHz processor in 50 years...
It would be interesting to see how long we are capable of running even just a while true
The power might go out, some electronic component might fail, or the cooling system, etc
What is the longest that we are actually capable of keeping the most simple system running?