'Return tuple of ``(is_due, next_time_to_run)``.
Note:
next time to run is in seconds.
See Also:
:meth:`celery.schedules.schedule.is_due` for more information.'

def is_due(self, last_run_at):

    rem_delta = self.remaining_estimate(last_run_at)
    rem = max(rem_delta.total_seconds(), 0)
    due = (rem == 0)
    if due:
        rem_delta = self.remaining_estimate(self.now())
        rem = max(rem_delta.total_seconds(), 0)
    return schedstate(due, rem)
