public static long getRepeatNextTriggerTime(JobPo jobPo) { long firstTriggerTime = Long.valueOf(jobPo.getInternalExtParam(Constants.FIRST_FIRE_TIME)); long now = SystemClock.now(); long remainder = (now - firstTriggerTime) % jobPo.getRepeatInterval(); if (remainder == 0) { return now; } return now + (jobPo.getRepeatInterval() - remainder); }
public static boolean isRelyOnPrevCycle(JobPo jobPo) { return jobPo.getRelyOnPrevCycle() == null || jobPo.getRelyOnPrevCycle(); }