Use beginBackgroundTaskWithExpirationHandler: API

To continue processing the tasks when the app is in the background
Send "willRetry" flag in the EDQueueJobDidFail event to tell if the job is about to be canceled

So the user can act on it