Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is there any way to run schedulers / schedule programs for example Cron Jobs using Objective-C at iOS Platform?

I need to create a schedule update to my ios, lets say for example every five days my app will fetch something to the internet and update the database I also want user to set the interval.

I think for this purpose cron jobs can be a vital part. Is there any suggestions or other ways?

share|improve this question
1  
In addition to wyatt's answer, check macworld.com/article/1164616/… –  ott-- Oct 1 '12 at 19:10
    
+1 for Nice article –  Md. Mahbubur R. Aaman Oct 1 '12 at 19:12
add comment

1 Answer

up vote 2 down vote accepted

There is no access to cron in iOS. In fact, iOS generally cuts down the ability to have your app stay running in the background -- user battery life is more important than developer convenience.

A poor man's approach would be to use CoreData to record a timestamp of last update, then check when the app is opened, and periodically while the app is running, if there should be a data update. If there are updates that come out while the user is not using the app you might want to look at push notifications and running something server-side.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.