title: Do simple task in the background after a long time on iOS 4+
body: <p><strong>Let me rephrase to make it clearer:</strong></p>
  
  <p>How can I have an "alarm" go off 20 minutes after my app has gone in the background?</p>
  
  <hr>
  
  <p><strong>Old question:</strong></p>
  
  <p>How can you have the simplest tast happen after 5-10-60 minutes on iOS? Essentially, have an NSTimer fire after a predefined interval.</p>
  
  <p>I do "begin task", sleep( for some time ); and then "end task". However my app usually gets killed if I sleep for more than 5 minutes. I've seen posts around that mention that apps can stay alive in the background for a few hours, how exactly can that be achieved?</p>