I want to schedule a nightly restart of my OSX media server, but I routinely have other machines in the house connected to this machine remotely (since it's also our TimeMachine system, iTunes library, etc.)
It's trivial to set a scheduled restart, but it always fails if other users are connected, which in my case they always are.
How can I schedule a nightly restart of this machine, that will automatically kick any connected users, quit all apps, and restart?
Also, what effect will this have on the formerly-connected applications like iTunes, TimeMachine, etc.? Will they simply see the machine again after restart and resume operations? Or will it cause them to get into a bad state?
Best Answer
You can use a third party tool like Power Manager to ensure the restart completes. The tool's web site includes has a recipe that shows how to schedule a restart.
Power Manager will ensure your Mac restarts, even if other processes or applications try and block the process:
With regard to formerly-connected applications like iTunes, and Time Machine; these applications will be quit and no data will be lost. Time Machine will resume backing up where it was stopped - it was designed to be interrupted.
After restarting, previously connected Macs will need to reconnect and be asked to resume playing any shared content. No harm will come to them.
If you are watching a streaming film while the media server restarts, the film will stop and you will probably need to resume the film playing. A smart player might seamlessly handle the dropped network connection but that is outside of the control of the media server.
Disclosure: I created Power Manager.