9v seems a high level to keep memory however, one can buy a rechargable 9v unit and you would need to build/buy a small trickle charger.
Thing is, you are adding more links to the chain of failure points.
What is the 24v, AC or DC..??
Simple alternative, memory battery could be like smoke alarm...