How do schedule a GcmTaskService to run every day at a specific time
<p>Basically it's a periodic GcmNetworkManager task that should run every day at a specific time, it's persistent so it survives across reboots, it's period is 86400000L (24h), but i need it to run the first time on a specific time.</p>

<p>I've already created the TaskService class, added it to the manifest and created the task, is there a way of doing this?</p>

<p>This is my TaskService class:</p>

<pre><code>public class AgendaTaskService extends GcmTaskService {

private static final String TAG = "AgendaTaskService";
public static final String TAG_TASK_UPDATE_EVENTS = "AgendaTaskService";

@Override
public int onRunTask(TaskParams taskParams) {

        Log.i(TAG,"Running task");

        switch (taskParams.getTag()){

            case TAG_TASK_UPDATE_EVENTS:
                Log.i(TAG,"Updating agenda events");

                //TODO HERE IS WHERE MY TASK WILL RUN

                return GcmNetworkManager.RESULT_SUCCESS;

            default: return GcmNetworkManager.RESULT_FAILURE;

        }

    }

}
</code></pre>

<p>And this is how I'm creating the task:</p>

<pre><code> GcmNetworkManager gcmNetworkManager = GcmNetworkManager.getInstance(this);
    PeriodicTask task = new PeriodicTask.Builder()
            .setService(AgendaTaskService.class)
            .setTag(AgendaTaskService.TAG_TASK_UPDATE_EVENTS)
            .setPersisted(true)
            .setPeriod(30L)
            .setUpdateCurrent(true)
            .build();
    gcmNetworkManager.schedule(task);
</code></pre>