• 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: Stay-Open Script Apps vs Cron
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


On Jun 5, 2014, at 4:40 AM, email@hidden wrote:

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

  • Follow-Ups:
    • Re: Stay-Open Script Apps vs Cron
      • From: "S. J. Cunningham" <email@hidden>
  • Prev by Date: Re: Stay-Open Script Apps vs Cron
  • Next by Date: Re: Stay-Open Script Apps vs Cron
  • Previous by thread: Re: Stay-Open Script Apps vs Cron
  • Next by thread: Re: Stay-Open Script Apps vs Cron
  • Index(es):
    • Date
    • Thread