• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A daily script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A daily script


  • Subject: Re: A daily script
  • From: Ed Stockly <email@hidden>
  • Date: Wed, 20 Dec 2000 12:20:50 -0800

> At 12:29 +0100 20/12/00, Ken Mcgregor wrote:
>> I need to run a script at a set time each day.
>>
>> I am stuck between either writing an idle script that rests for a perid then
>> checks the time. (current hour)
>> or whether to use something like Cron.
>>
>> It will be run on a dedicated Mac.
>>
>> Any advice gratefully received

The simplest solution, not requiring any third party software is to do this
from within an idle handler.

However, rather than rest for a period and then check the time, I suggest
calculating the time difference and idling for the number of seconds until
the script is needed to run:

on idle
set timetoAct to "2:00 am"
set interval to (date timetoAct) - (current date)

return interval
end idle

HTH,

ES

When on the net visit: <http://justapplescript.weblogs.com/>


  • Prev by Date: Re: easy way to check if item is file or folder
  • Next by Date: Re: Stay Open Applet freezes computer when told to quit.
  • Previous by thread: Re: A daily script
  • Next by thread: re: A daily script
  • Index(es):
    • Date
    • Thread