Fix for rare case where task won't be listed in system.

This commit is contained in:
Louis Vézina 2019-04-22 21:38:57 -04:00
parent db189c7773
commit b738922b0c
1 changed files with 2 additions and 0 deletions

View File

@ -1654,6 +1654,8 @@ def system():
if isinstance(job.trigger, CronTrigger):
if str(job.trigger.__getstate__()['fields'][0]) == "2100":
next_run = 'Never'
else:
next_run = pretty.date(job.next_run_time.replace(tzinfo=None))
else:
next_run = pretty.date(job.next_run_time.replace(tzinfo=None))