Just started working with the dispatcher a day ago, so I could be wrong. I think for what you want to make your work as repetitive and choose the appropriate trigger .
final Job.Builder builder = dispatcher.newJobBuilder() .setTag("myJob") .setService(myJobService.class) .setRecurring(true) .setTrigger(Trigger.executionWindow(59, 61));
Would give you a job that repeats about every minute.
How to start the task and configure the dispatcher in general, I would recommend you take a look at testapp, which is available in the FirebaseJobDispatcher git repository (which you have already linked). Especially the JobFormActivity and DemoJobService classes .
source share