How to use the tempora.schedule.PeriodicCommandFixedDelay.daily_at function in tempora

To help you get started, we’ve selected a few tempora examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yougov / pmxbot / pmxbot / core.py View on Github external
def as_cmd(self):
        factory = (
            schedule.PeriodicCommandFixedDelay.daily_at
            if isinstance(self.when, datetime.time)
            else schedule.DelayedCommand.at_time
        )
        return factory(self.when, self)