How can I restart on a schedule, if network users are connected?
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:


  Power Manager is multiple user savvy and first deals with the logged
  in users. The following steps happen within each logged in user’s
  session:
  
  
  Running applications are sent a quit request.
  Running applications are given time to quit.
  If an application has not quit in time, the application is force quit.
  With all the applications quit, the user is logged out.
  
  
  Once all the users are logged out, Power Manager then asks Mac OS X to
  shut down. You can watch this sequence play out in the transcripts of
  the Mac’s system.log file.


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.