I'm making an App that once a day connects to a FTP server. Now, for that I use AlarmManager and IntentService and it works fine on normal conditions.

Now say theres no Internet when the Alarm fires and I want it to try again every 15 minutes until it connects and finishes the task successfully. How can I do that?

Is it possible to create an alarm that creates an alarm?
Can the service stop the alarm once the task is completed successfully?
Is there a better way?