1999 Jeep Cherokee auto-lock not working

My 1999 Jeep Cherokee doesn’t get driven a lot since I’ve been driving Priuses. A few years ago I noticed that the key fob was not locking/unlocking the doors. The doors would kind of ‘half-way’ lock and unlock. I changed the battery, but that didn’t solve the issue. Later, the locks are not locking or unlocking when I use the central locking switch on the side console.

Any idea what might be wrong? (I haven’t checked the fuze.)

Are all the doors doing the same thing or some of them? If it’s just one, I’d open the door and look at the mechanism that locks/unlocks to see if it’s wearing out.
If it’s all of them (which I’m guessing it is), I’d pull up a wiring diagram and see if you can find what controls the door locks. Better yet, see what components are common to all of them, especially things that can ‘wear out’ (like when it was half working a few years ago) instead of just stopping one day. Could be a relay, a wire that’s rubbing on something, a harness that’s not fully plugged in. Hopefully something easy like that, as opposed to a module going out.

It’s all of the doors, and the hatch.

The fuse is certainly worth checking out*, but would likely only be the case if what happened a year ago and what happened now are unrelated. Something you might want to look at, especially if you’re having any other issues, is grounds. A ground from the body to the frame or the frame to the engine block that’s broken or so corroded you can break it just by touching it could cause some of these problems.
*Actually, check all the fuses, some of them will power modules that may, in turn, control the locks.

Joey_P is spot on. If those ideas don’t work I am willing to bet quantities of something that you may have to replace a door lock module. Since they are both linked, one could be giving out and causing problems with the other. If you are inclined to do so, take the door panel off and disconnect one at a time and try to operate the switch. If it works when one is disconnected you will have to replace the disconnected one. AFAIK there isn’t a relay that controls the locks, but of course as you said checking the fuse may help.

The water pump was about to fail, so I took the Jeep to the shop on Wednesday. I tried using the console switch, and I could hear the locks ‘trying’ to work but they weren’t moving. I picked the Jeep up this afternoon with its new water pump. Magically, the auto locks are now working, even with the key fob.

Unrelated to the pump, I know. Nevertheless, they’re working now.

It’s possible that the shop saw a ground strap that was about to break and replaced it. You could take a look and see if you can find a shiny new ground strap in there somewhere. I’d start by scanning the firewall and see if you can find one that runs from the firewall to the block or the firewall to the frame. It’s a long shot that they saw it and fixed it without saying anything. I’d also be surprised if the locks were they only thing giving you problems, but bad grounds do strange things.

It could also be a broken wire where in the boot from the door to the rest of the car. That’s something I’ve seen get funny. You could try hitting the lock/unlock button as you slowly open and close the door to see if there’s any change as wires get moved around.