I want to restart my headless macMini via an appleScript, scheduled by multiple iCal Alerts. I’ve found that because reopens apps at restart, a loop is created which forces another restart. I also have learned that iCal will reinitiate the alert because it was not completed before the reStart. Maybe running the script async on another thread/queue with a timer? I’ve successfully created an Automator that closes all apps and then deletes the iCal event before the restart. This works and solves my problem, but seems kludge. Is there an elegant way? I know about the power settings option, but need more scheduling flexibility.
tell application “Finder” to restart