【发布时间】:2020-07-20 14:07:30
【问题描述】:
app/tasks.py
from background_task import background
@background(schedule=60)
def schedule_task():
print('running_tasks')
app/views.py
schedule_task(repeat=300, repeat_until=obj.end_date)
我已将django_background_tasks 放入 INSTALLED_APPS 并运行迁移。
但是当我尝试使用命令python manage.py process_tasks 运行任务时,该命令根本不起作用。当我在写完命令后按回车键时,什么也没有发生。
【问题讨论】:
-
@user1242848 问题解决了吗?更新您的状态
标签: python django django-views