• 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: Axel Luttgens <email@hidden>
  • Date: Thu, 05 Jun 2014 13:18:30 +0200

Le 5 juin 2014 à 11:50, S. J. Cunningham a écrit :

> [...]
> 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.
> [...]

Hello Steve,

Perhaps could you reverse the logics?

The easiest, and probably the safest, would be to have the idle handler run, say, every 5 minutes.

For example (with probably lots of details left as pseudo-code):

	on idle

		set last_activity to <fetch the last activity time from the last activity file as an AppleScript date>

		if current date - last_activity >= 2*hours then
			<sound a local alarm>
		end if

		return 5*minutes

	end idle

HTH,
Axel


 _______________________________________________
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>
References: 
 >Stay-Open Script Apps vs Cron (From: "S. J. Cunningham" <email@hidden>)
 >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: Apple Mail syntax for nested folders
  • Previous by thread: Re: Stay-Open Script Apps vs Cron
  • Next by thread: Re: Stay-Open Script Apps vs Cron
  • Index(es):
    • Date
    • Thread