Reputation: 1121
I use cookiecutter-django with celery==3.1.25. Now I need use tasks scheduler, and my opinion, best way for this - it's celery beat.
But here I found information that celery-beat works with Celery version 4.x
Here I saw the information that pyup-bot on July 24 offered to update Celery to version 4.1.0, but this issue is still open.
Prompt, how to be in my situation? I like cookiecutter-django and I'm using it now in my project, but also, I really need a task scheduler.
I have not yet tried to replace the version of Celery, but I think that this will lead to a number of mistakes, otherwise it would have been done before me.
Upvotes: 0
Views: 924
Reputation: 296
You can still use beat with celery 3.X.
Just add a section in your settings:
CELERYBEAT_SCHEDULE = {
# Executes every Monday at midnight
'do-task-every-monday': {
'task': 'path-to-your-task',
'schedule': crontab(hour=0, minute=0, day_of_week=1),
'args': (),
},
}
As for Celery 4.x support on cookiecutter-django, see the on-going discussion at this PR.
Upvotes: 1