I have a daemon/script that runs daily, but I can't find a way to make it run if the computer was off at the scheduled time. Specifically, I'd like:
- run script/daemon once a day at a X:00 am
- if computer is off/sleeping at X:00, runs immediately when it wakes
- if daemon misses scheduled runs (off for several days), it runs once immediately when it wakes
The first point is handled easily with:
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>10</integer>
</dict>
Running on startup/login when the scheduled time is "missed" is not the (default) behavior of launch agents, despite the suggestion (and later correction) in this question: