PDA

View Full Version : Can you check this applescript for me




oldschool
Feb 20, 2004, 06:54 PM
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?



Thirteenva
Feb 20, 2004, 07:11 PM
To schedule cron jobs the best solution is cronnix. Its a nice little app that provides gui access to setting up cron jobs (such as the maintenance commands).

Look for it on versionTracker or google.