forked from platypush/platypush
[#217] Casting get_next
to datetime
to prevent DST issues
This commit is contained in:
parent
e9454b0c0f
commit
55958c1b57
1 changed files with 2 additions and 2 deletions
|
@ -90,8 +90,8 @@ class Cronjob(threading.Thread):
|
|||
now = get_now()
|
||||
self._event_type = CronjobEvent.NONE
|
||||
cron = croniter.croniter(self.cron_expression, now)
|
||||
next_run = cron.get_next()
|
||||
self._event.wait(max(0, next_run - now.timestamp()))
|
||||
next_run = cron.get_next(datetime.datetime)
|
||||
self._event.wait(max(0, (next_run - now).total_seconds()))
|
||||
|
||||
def stop(self):
|
||||
self._event_type = CronjobEvent.STOP
|
||||
|
|
Loading…
Reference in a new issue