On every start-up I set a new wake-up date from the Pi with a Python script.
If this script fails (or the service doesn't start it for any reason), I'm doomed and I'll never wake-up again.
Is there a way to set-up, programmatically, a periodic wake-up? Or maybe select, programmatically, a schedule script (because I need to be able to wake-up every 6 hours or 8 hours depending on client choices during the life time of the product)?
Or, what happens if I set a schedule script to wake-up every 48 hours (as fail safe option) but set new wake-up dates from my Python script. Will it erase the date set by the schedule script, or will it wake-up every 48 hours anyway?
Witty Pi 5 currently has one scheduled startup alarm and one scheduled shutdown alarm.
A schedule script does not create a separate periodic alarm in parallel with a manually configured wake-up time. When the firmware processes an active schedule script, it finds the next relevant startup and shutdown actions and writes them into the same alarm settings that are used when you manually configure the next startup time.
Therefore, a 48-hour schedule script cannot be used as an independent fail-safe while your Python script also sets arbitrary wake-up times. The two mechanisms may overwrite each other. In particular, when the Raspberry Pi shuts down, the firmware processes the active schedule script again to determine the next startup time, which may replace the startup time previously written by your Python script.
