Behavior on return from power outage?

I’ve seen lots of discussion about what state a given device will take when returning from a power failure, but has anyone written any method for, say, checking a schedule and going to a state based on that? I have a GE Z-Wave outlet and I’m wondering if there is a variable I can use to trigger something like that.
What I’m after here is that I have a Z-Wave switch opening and closing my chicken coop. I want to avoid a situation in which the SmartApp misses a scheduled trigger due to a power outage, then the coop stays open all night or closed all day, even after the power is restored. Any thoughts on this?