I followed instruction after changed my task's schedule:
# in `django-extensions`'s shell
from django_celery_beat.models import PeriodicTask, PeriodicTasks
PeriodicTask.objects.all().update(last_run_at=None)
for task in PeriodicTask.objects.all():
PeriodicTasks.changed(task)
Since PeriodicTasks.changed() require one argument(It occurs an error!), I execute code like above.
And I waiting until task runs but it didn't....
So I just turn off and on django-celery-beat, then it works..
What's the problem?
Same problem
Same problem!!
Having the save issue, had to resort to this because even the loop was letting the last_run_at still reflect as None, breaking beat:
from django.utils import timezone
from django_celery_beat.models import PeriodicTask, PeriodicTasks
last_run = timezone.now().replace(day=22)
PeriodicTask.objects.all().update(last_run_at=last_run)
Having the save issue, had to resort to this because even the loop was letting the
last_run_atstill reflect asNone, breaking beat:from django.utils import timezone from django_celery_beat.models import PeriodicTask, PeriodicTasks last_run = timezone.now().replace(day=22) PeriodicTask.objects.all().update(last_run_at=last_run)
need to check if this is still needed in master
should be fixed now
Most helpful comment
Duplicate of https://github.com/celery/django-celery-beat/issues/7