In the event of a power outage, an analogue power socket timer switch will simply turn off. When then power returns, the unit is not aware of how long the power has been out for and the timer will continue from when the power cut.
If a digital timer is used, on power being restored, the time should be correct with your on/off schedule preserved.
When using a Linux system (Raspberry Pi) and Cron to set a scheduled task, if a power cut occurred within the time an action was supposed to initiate, this window will be missed as when the system power is restored the action event would have passed and won’t be initiated until the next scheduled time.
For the ARPIC or Linux system to act like a 7 day digital timer a script is used on start up to check the time.