Best practice for using lithium as backup power for an always-on project?

Hi, I have a project that's powered by a wall wart that I'd like to keep powered during outages/survive being unplugged for up to a few hours. I have tons of 18650 batteries from my vaping days that I like to use in my portable projects. This time I'd like to put a cell or two to work inside a box with a critical purpose that must remain powered at all times.

As I understand it, one mustn't leave lithiums in a constant charge state as the risk involves damage to the cells/potential fire. How would I go about safely setting up 18650 cells for use as a UPS for a small project that only draws a few mAh?

Thanks for any advice.

You can go on eBay and get the boards that control charge and behave as a UPS for your project. Use this "ups li" as your search term it will give you lots of hits for less then $5.00. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

Do you need to do anything while you are disconnected, or do you just need to store something and keep the time alive? Some microcontrollers have special backup memories with a real-time clock that can stay alive when you connect a coin cell to some special pins.