Hi,
I would like to activate an applescript based on a schedule that varies when it fires.
Specifically I have a script that polls the location of my Tesla (I love the API they've exposed for it). The problem is that they only allow you to call the locate command a certain amount of times per minute. I would like to speed up and slow down my polling rate for the call based on the location of the car (ie, if it is close to the house and heading towards the house, to turn on the outdoor lights and open the garage door. If moving away from the house, slow down the poll rate, etc).
I have all this working however it is only working with an 'always-on' applescript that fires off another applescript based on a poll-rate variable. Instead of leaving the applescript always spinning checking the poll rate I'd rather fire off a schedule based on the next poll time but I'm not sure how to create that linkage. Any suggestions?
Thanks