I want to start a JobScheduler at a specific time everyday, and finish it after 3 hours.
I have the part of triggering the job every 20 min, and fo
adding setMinimumLatency on jobInfo with the deference of the current time and the target time solves this issue.
JobInfo jobInfo = new JobInfo.Builder(1, componentName)
.setPersisted(true)
.setBackoffCriteria(6000, JobInfo.BACKOFF_POLICY_LINEAR)
.setMinimumLatency(1000 * 60)
.build();
for the example above the scheduler will work after 60 secs.