• 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: Background Process?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background Process?


  • Subject: Re: Background Process?
  • From: Daniel Richman <email@hidden>
  • Date: Tue, 10 Mar 2009 18:41:11 -0700

Thanks for correcting me.  I have a lot to learn about this.


Kyle Sluder wrote:
On Tue, Mar 10, 2009 at 9:24 PM, Daniel Richman
<email@hidden> wrote:
Set your program as a User Agent with launchd on install (i.e., a login
item). launchd will make sure your program is running when the user logs in.

launchd doesn't launch Login Items. It does, however, launch per-user agents, but these only work on 10.5.

Then, take a look at the NSTimer docs to implement the every-so-often part
of it.

This is a bad idea. It will put unnecessary burden on the processor, and therefore reduce battery life on mobile machines, by doing nothing in the runloop until the timer fires. It's just not an appropriate use of the NSTimer functionality.

launchd already has the capability of launching tasks on a schedule
using the StartCalendarInterval plist key.  Just use it.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Background Process? (From: Pierce Freeman <email@hidden>)
 >Re: Background Process? (From: Daniel Richman <email@hidden>)
 >Re: Background Process? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Background Process?
  • Next by Date: Re: Background Process?
  • Previous by thread: Re: Background Process?
  • Next by thread: Re: Background Process?
  • Index(es):
    • Date
    • Thread