I hope your day is going well. I've hit a bit of a snag with a Django project I’m working on. I'm relatively new to Django and would deeply appreciate it if you could spare a moment to help me troubleshoot an issue. I'm using Celery Beat for scheduling periodic tasks. I have a view in the admin where I check and set periodic tasks, but recently a strange error has appeared, and I can't locate the issue. Whenever I try to open any admin view with periodic tasks, I get this type of error:
It indicates a problem with resolving the names of the crontabs:
During handling of the above exception (invalid literal for int() with base 10: '0DAY'), another exception occurred:
But I haven't changed anything in the database or modified anything with settings. Do you know how I can resolve this issue, or where to look for a solution? It's probably a default setup and nothing there is set or modified, and I also couldn't find any solution to my problem on the internet :(
I'm using :
django-celery-beat==2.5.0
Django==4.2.2
I do not have any external settings to celery beat in django project :(
The problem happens in the
CrontabSchedule
model object when it attempts to invoke the propertyhuman_readable
. I noticed this when looking at the entries in the database forCrontabSchedule
that I had one problematic row:The
day_of_week
column should actually be an integer, where 0=Sunday, 1=Monday, etc. After updating the problematic entry in the database, this resolved the issue for me. Hope this helps!