Applescript to automate timed restarting