The only device I can think of that might help would be your UPS. They can have programming that may control the return of power. Two cases, one while the batteries are still in play and the other after the batteries are depleted. Just a thought and would take some reading to see if any help.
Personally, I could easily set up a relay and delayed control to accomplish what you describe, but stopped long ago providing work-around options.
Bud
Personally, I could easily set up a relay and delayed control to accomplish what you describe, but stopped long ago providing work-around options.
Bud