Skip navigation
This discussion is archived

Setting a time for Applescript to run?

253 Views 2 Replies Latest reply: Mar 22, 2006 3:45 PM by reese_ RSS
David J. Paetkau Calculating status...
Currently Being Moderated
Mar 18, 2006 8:23 PM
I like to keep my computer on at night, running programs, downloading and whatnot, however, I don't want it to still be on in the morning, I want it to shutdown around 4 am. Unfortunately, some of the programs I'm running (for downloading or converting video files) don't quit nicely, and cancel the shutdown, which just leaves the computer running, but doing nothing (and because of the pop-up saying shutdown was cancelled, not even sleeping).

What I'm hoping to do is write a script that would quit the applications a few minutes ahead of the shutdown time, so that they'd be closed by the time shutdown starts, and it would work properly. Is it possible to write a script that would run automatically at a certain time? Even if I had to run it before I left the computer, if it could run in the background until that time, that would even work.

Is that even possible???
Dual 867MHz Power Mac G4, Mac OS X (10.4.5), 512 MB RAM, 60 + 180 GB, GeForce4 MX, 32 MB vRAM
  • Justin S. Level 3 Level 3 (655 points)
    Currently Being Moderated
    Mar 19, 2006 7:49 AM (in response to David J. Paetkau)
    Hi David,

    Its most certainly possible for a script to run at the same time every day. Many users like CronniX which is a aqua frontend for the unix tool cron. It would allow you to schedule your script to run every morning at a certain time. However, it is a little more complex than the simplest method. You can attach an applescript to an ical event. So if you just had an event in your ical every morning at a certain time, and attached the script to it, it would run. Good Luck!

    --Justin S.
    Powerbook G4 17 1.67 Ghz, Mac OS X (10.4.5), 1 Gb Ram, 160 GB OWC FW 800, Digi 002 Rack
  • reese_ Level 4 Level 4 (1,735 points)
    Currently Being Moderated
    Mar 22, 2006 3:45 PM (in response to Justin S.)
    Why not just setup the power management to put it to sleep on idle? Then you don't have to argue with the programs and (bonus) when you return just giggle the mouse and return where you left off.

    Or, if you want to play with a heavy hand and really don't want to discuss the issue with those chatty apps you can use the unix command 'shutdown' in root's cron. It's not very polite, but it does the job.

    Mac OS X (10.4.5)


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.