Wake from sleep and VIN pin

I’m going to be connecting a 1uF SuperCap (or maybe a 3V coin cell) to the VIN pin for the real time clock on the Panda.

I was wondering if it is possible to switch the Panda off completely at the 12V input (with a MOSFET) but let it wake up after a time period and switch itself on. This is a chicken and egg situation… If the 12V is switched off, then obviously the CPU can’t run even sleep cycles. But the RTC is running off VIN, and if it could raise and alarm on one of the output pins, that could power things up.

I’m looking for a solution to run it on batteries but it must have really low standby current. It will also be switching off all external peripherals (LCD, RFID) and it is a lot easier to just switch everything off on one circuit - in other words isolate the battery completely. It can wake up every few seconds just to check if the on button is pressed.

Any ideas how to do this?

ALARM pin works even if the device is not powered as it uses vbat power. This pin is not found on all devices.