[launchd-dev] Launchd user agent with StartInterval preventing sleep

Gabriel Gilder gabriel at gabrielgilder.com
Tue Aug 31 11:37:04 PDT 2010


Hi all,

First off I apologize if this is a dumb question or I'm missing something
obvious...

I'm setting up a Ruby script to run via launchd at a given interval. Ideally
I'd like to have it run every 15 minutes or so, so I've set StartInterval in
the plist to 900. The problem I'm running into is that, if my computer is
set to a delay of longer than 15 minutes before going to sleep, the script
will prevent it from sleeping. I guess every time it runs it resets the
sleep delay, so sleep is never triggered.

Does anyone have a suggestion for preventing this behavior? Is there some
way I can make my script's activities not reset the sleep delay timer? My
script runs some SVN commands, generates some logs, and displays Growl
notifications. Is any of that inherently going to reset the sleep delay
timer?

Thanks for your time...

-Gabriel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20100831/aeee43a2/attachment.html>


More information about the launchd-dev mailing list