views:

3309

answers:

3

Note - I have not delved very deeply into Apple's iPhone SDK yet.

However, based on another question asked recently, I'm wondering if, since the iPhone is running some stripped-down edition of Mac OS X if it doesn't have a crontab feature.

If so, how would you access it?

Thanks.

+5  A: 

http://hackint0sh.org/forum/showthread.php?t=31658

Seems that cron runs by default on the iPhone, you just need to be able to edit the crontab file - either the root one or the user one but not the user one apparently.

There are issues with sleep and cron, but there's a good discussion at that link.

JeeBee
Is there any way to access crontab on an un-jailbroken iPhone?
Kristopher Johnson
I don't believe so. Here's hoping that Apple will put timers and scheduled tasks into a future version of the iPhone OS / SDK, but for tasks that are network polling I think they will want you to use the push notifications feature in the next release.
JeeBee
+5  A: 

The iPhone does run cron - but you won't be able to use it in any application developed solely with the SDK. There is absolutely no support for background process or background launching via alarms or timers (e.g. crontab).

Airsource Ltd
+2  A: 

You can't use cron on an un-jailbroken iPhone.

Maybe you could take advantage of the Push Notification service: Have cron (or some other scheduler) running on another machine which sends notifications to the phone at the appropriate time.

Kristopher Johnson
And hope that you don't have an application like one I shelved that requires waking up every minute!
Epsilon Prime