I want to create a "startup item" in os x. All of the recent documentation suggest that launchd should be preferred over traditional Startup Items.
However, launchd seems to be geared towards launching actual daemons, not for quick tasks that do their work and exit. The developer library document says:
Important: If your daemon shuts down too quickly after being launched, launchd may think it has crashed. Daemons that continue this behavior may be suspended and not launched again when future requests arrive. To avoid this behavior, do not shut down for at least 10 seconds after launch.
This gives me the impression that launchd is not the way to go. Implementing a 10 second sleep sounds like a sloppy solution.
In essence, my question boils down to this: What is the correct way to run a "Hello world" program at startup? Is launchd the wrong tool here?