def schedule(self, runnable, delay=None):
        if delay is None:
            delay = runnable.repeat

        if not delay:
            log.error("Task %s has no repeat value.", runnable)
        else:
            log.debug("Scheduling %s in %s seconds.", runnable, delay)
            deferred = task.deferLater(reactor, delay, runnable.start)
            deferred.addBoth(lambda x: self.schedule(runnable))
RESTful CRUD controller for the Email Outbox
dataset/ETHPy150Open marineam/nagcat/python/nagcat/scheduler.py/Scheduler.schedule--crossover with--dataset/ETHPy150Open sahana/eden/controllers/msg.py/email_outbox