Is there a safe way to shut down a Mac that doesn't have a keyboard or mouse?

I'm trying to safely shutdown a Mac desktop that does not have a keyboard or mouse connected to it any more, after hardware damage to the only keyboard and mouse in the house. It also does not have network access that I can get to from an iPhone, eg ssh etc is not enabled.

Besides doing a force shutdown by holding the power button, is there a better way to shut down a Mac in this situation?

This is anonther example of when this might be needed.


Solution 1:

There are two possible ways provided by OSX.

  1. When you shutdown via menubar → shut down, you get a one minute counter till shut down. That's enough time to disconnect your devices. enter image description here
  2. System Preferences → Energy Saver → Schedule

enter image description here