Yeah... you can save a variable to two to flash but for what you want to do, you'll probably need a battery. Sometimes super capacitors are used to keep RAM memory powered but they are not usually used to power a microprocessor.
Capacitors make terrible batteries because of their discharge curve is the opposite of what you want in a battery. You want a battery that holds most of its voltage as it discharges. Capacitor voltage drops drastically as soon as you start drawing current and then it levels-off after it's near zero and mostly discharged.