On Tue, Mar 10, 2009 at 9:24 PM, Daniel Richman
<applemaill...@mm.danielrichman.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to