src/sisy/models.py
def calc_next_run(self):
        """Calculate next run time of this task"""
        base_time = self.last_run
        if self.last_run == HAS_NOT_RUN:
            if self.wait_for_schedule is False:
                self.next_run = timezone.now()
                self.wait_for_schedule = False # reset so we don't run on every clock tick
                self.save()
                return
            else:
                base_time = timezone.now()
        self.next_run = croniter(self.schedule, base_time).get_next(datetime)
        self.save()
def calc_next_run(self):
        """Calculate next run time of this task"""
        base_time = self.last_run
        if self.last_run == HAS_NOT_RUN:
            if self.wait_for_schedule is False:
                self.next_run = timezone.now()
                self.wait_for_schedule = False # reset so we don't run on every clock tick
                self.save()
                return
            else:
                base_time = timezone.now()
        self.next_run = croniter(self.schedule, base_time).get_next(datetime)
        self.save()
Calculate next run time of this task