There's no simple answer to this; you really need to read—or at least familiarize yourself with—the Daemons and Services Programming Guide, particularly the "Creating Login Items" section.
If you plan on creating a sandboxed (App Store) application, that limits your options somewhat, but not dramatically (for this kind of application).
You need to decide if your background process needs a UI or not. I suspect not, so I'd direct you to the either the XPC Service or user agent route. These will be registered with launchd
and launchd
has about a billion different options for how and when your process gets launched, and one of those is periodically. For more info on those, see man launchd.plist
, particularly StartInterval
and StartCalendarInterval
.
With this knowledge, I'd then suggest to do some internet and open source searches looking for examples. I'm sure you'll find plenty.