Using Terminal to shut down a computer
I have a blind server (Macmini) and sometimes a process might hang. It is set to shut down at hour x and start at hour y. However if a process is hanging this will not happen. I want to use Apple Script to run a script after hour x to force the Mac to shut down.
Now I know “sudo shutdown -r now” will do so but it needs a password. I could script the password in the Apple Script but would rather avoid this. It there a way to bypass it all and shut down the Mac completely.
Thanks