Re: Stay-Open Script Apps vs Cron
Re: Stay-Open Script Apps vs Cron
- Subject: Re: Stay-Open Script Apps vs Cron
- From: Ted Wrigley <email@hidden>
- Date: Thu, 05 Jun 2014 10:03:16 -0700
I would prefer the daemon to run asynchronously, ie two hours from the last activity rather than simply every two hours. I thought I could do this by changing the idle time in an idle handler every time an email arrives but it looks like that is not possible.
Actually, that is possible - I’ve done it frequently. all you need to do, for instance, is return a number from the idle handler. for instance:
on idle return 7200 end idle
will call the script app in two hours (give or take ten seconds)
However, you may want a blend of launchd and applescript. Launchd plists have the advantage that they will not stop as long as the system itself is running, and they can make sure that daemons always restart if they quit.
Incidentally, I don’t know anything about Foscams. is email the only notification option they give? email is a clunky hack - if the device has other ways of sending alerts to the computer it might simplify everything. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden