- Start up automatically at a specific time
- Launch a Parallels virtual machine (Windows 7)
- Run a program on Windows to collect data
- Suspend the Parallels virtual machine
- Shut down the Mac
The machine starts up nicely using Energy Saver scheduler as expected.
I'm using custom launchd.plist entries to run the Windows VM and suspend it. This happens without there being a graphical login to the Mac.
I cannot use Energy Saver to schedule a shutdown because there has to be a user logged in for that to work.
At the moment I can't get a launchd.plist to shutdown because Unix security prevents anonymous shutdown.
The log entry is;
30/10/2013 04:17:08.783 com.apple.launchd: (0x7fe6c0423fa0.anonymous.shutdown) Switching sessions is not allowed in the system Mach bootstrap. 30/10/2013 04:17:08.783 com.apple.launchd: (0x7fe6c0423fa0.anonymous.shutdown) _vprocmgr_switch_to_session(): kr = 0x44c
Does anyone have any suggestions?