Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to access certain system-data?



 1.  You can make applescripts to do tasks that you want and schedule them with a crontab.

To schedule an applescript:  
1.  Save your script somewhere logical like in Library -> scripts
2.  open Terminal and type:  sudo pico /etc/crontab
when asked, type your administrator password
Arrow down to the bottom of the window and add 0 0 * * * YourUserName osascript "pathToYourScript"  
--this will set the computer to run the script at midnight each day.  If you replace the other asterixes, you can enter times for  minute, hour, day of the month, month and week day
press control-X 
--exits pico
press y to confirm your changes
and Enter when pico asks you if you want to save the changes

Another way to shut down your computer would be to run sudo shutdown -now instead of your applescript with crontab through pico.

0 0 * * * sudo shutdown now


Checking out your crontab file will let you see the time you have set to start up currently and you can then schedule that.

So there are lots of ways of scheduling start-up and shut down activities.

On 18/09/2006, at 2:38 PM, Holger Pleus wrote:


Am 17.09.2006 um 23:35 schrieb Peter Baxter:

What are you trying to do Holger?


I'm trying to write an application wich should allow me to program multiple on/off times. Such as having my mac start up on weekdays at 07:00 am and shut down at 06:00 pm and on weekends having it run between 10:00 am and 06:00 pm.

is there an elegant way to do this?

Holger

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >How to access certain system-data? (From: Holger Pleus <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.