I'm looking for an auto shutdown app that will forcefully shut down the computer at an appointed time.
The most important part of this is that the shutdown should not be cancelable (unless the process is extremely onerous).
|
|
Ok, so further to my previous answer, I can walk you through getting cron (a built in UNIX schedule service) to run a scheduled shutdown command for you. It will run as root and will be forced.
You'll need to enter your login password and then press enter. You'll now be in a text editor (vim). Carefully input the following keystrokes.
Let's say you want the machine to shutdown at 2am every day, we'd now enter:
If you wanted the machine to shutdown at 2:30am every day, you'd enter:
You should now be dropped back to the command line where you started. You're done! |
|||||||||||||||
|
|
This can be scheduled in System Preferences > Energy Saver > Schedule. I'm not certain that this will initiate a forced shutdown, you'd have to try it out. But that's a built in option to automate scheduled power down/up.
|
|||||||||||||||
|
|
It can be canceled though:
Halt at
Halt in 4 minutes:
If the plist was owned by a normal user, trying to load it would result in the error
The agent can be loaded by logging out and back in, or with:
This would perform a normal non-forced shut down:
|
|||||||
|
|
You can use
where time specifies a future time in one of two formats: +number, or yymmddhhmm, where the year, month, and day may be defaulted to the current system values. The first form brings the system down in number minutes and the second at the absolute time specified. |
|||
|
|
# see note below
Note:As written, the plist will cause the computer to be shutdown at 11pm (local time) every day. If you want to change the time, edit the script in any text editor. Change the Hour and Minute keys, excerpted here:
(note the use of 24-hour time) |
|||
|
|
|
I'd take a look at this tech note by Apple |
|||||||||||
|