I have a mini that acts as a server. I want this mini to restart every morning at 3am. I know how to tell it to do this in settings but there's an issue. I have Unify Controller and Home Assistant running in a VM. When the mini tries to restart it get's stopped because both of these programs require manual action before shutting down. Unify Controller asks if I'm sure I want to quit the application and VirtualBox asks how I want to shut the machine down. Since Unify Controller has no shutdown option, pressing Command + Q just makes the program ask if you're sure you want to quit, I guess I need to run a script or something that force closes the app. For VirtualBox, if I do Command + Q it nicely shuts down Home Assistant and then quits VirtualBox. I also have the mini on an APC UPS with the accompanying software. So that software is taking care of telling the mini to shutdown and whatnot but again, it won't because these programs stop it. How do I go about executing a script or something at shutdown/restart to achieve this; whether it's initiated by MacOS from a Schedule in Settings or by the UPS software telling MacOS to shutdown.
Crossposted
Crossposted