I'm extremely new to applescript. I know its always been there but i never learned how to use it. Now i wanted to make some scripts to run the cron maintenance, and have it scheduled through iCal. This is the script I wrote: tell application "Terminal" activate do shell script "sudo periodic daily" password "mypassword" with administrator privileges end tell tell application "Terminal" quit end tell As far as i can tell it opens up terminal, performs the maintenance and closes terminal...but I have my doubts. Can I make it better?