parent
e458127fb5
commit
a2ac26c072
1 changed files with 2 additions and 1 deletions
|
@ -4,7 +4,8 @@ from src import ModuleManager, utils
|
||||||
class Module(ModuleManager.BaseModule):
|
class Module(ModuleManager.BaseModule):
|
||||||
def on_load(self):
|
def on_load(self):
|
||||||
now = datetime.datetime.utcnow()
|
now = datetime.datetime.utcnow()
|
||||||
next_minute = now.replace(minute=now.minute+1, second=0, microsecond=0)
|
next_minute = now.replace(second=0, microsecond=0)
|
||||||
|
next_minute += datetime.timedelta(minutes=1)
|
||||||
until = time.time()+((next_minute-now).total_seconds())
|
until = time.time()+((next_minute-now).total_seconds())
|
||||||
self.timers.add("cron", self._minute, 60, until)
|
self.timers.add("cron", self._minute, 60, until)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue