Unable to restore job "b'30'" -- removing it
Traceback (most recent call last):
File "/opt/py3/lib64/python3.6/site-packages/apscheduler/jobstores/redis.py", line 131, in _reconstitute_jobs
jobs.append(self._reconstitute_job(job_state))
File "/opt/py3/lib64/python3.6/site-packages/apscheduler/jobstores/redis.py", line 119, in _reconstitute_job
job_state = pickle.loads(job_state)
AttributeError: Can't get attribute 'CronTrigger' on <module 'apscheduler.triggers.cron' from '/opt/py3/lib64/python3.6/site-packages/apscheduler/triggers/cron/__init__.py'>
Случайные ошибки, возникающие после перезапуска Django, я не знаю, почему
def add_daily_task(task_id):
crontab = CrontabTask.objects.get(pk=task_id)
scheduler.add_job(func=crontab_task,
args=[task_id],
trigger=CronTrigger.from_crontab('%s %s %s %s %s' % (crontab.crontab_minute,
crontab.crontab_hour,
crontab.crontab_day,
crontab.crontab_month,
crontab.crontab_week)),
id=str(task_id),
jobstore='eazyops',
replace_existing=True)
это мой код add_job