I have a problem with my “Energy Saver” prefs in that the machine won’t shutdown at the scheduled time, so I wrote a script:
on awake from nib theObject
tell application "System Events"
shut down
end tell
end awake from nib
but when the machine is sitting at the login window the script launches from cron but just sits there and won’t shutdown, so then I tried to at a “killall loginwindow” to the script to see if that was the hangup, but that only recycles the loginwindow with no shutdown.
Can someone please tell me how to execute a shutdown if a machine is at the login window?
I tried that and it works (I’m using Cronnix) if I test it with the “RUN NOW” button, but if I set it to run at a certain time and then log out to the login screen the command does not execute.
i just tried it using /etc/crontab and it didn’t shutdown the system (same problem your having), which is strange. maybe it runs of launchd or something ?