Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Celery task does not run when crontab day of week is set to 7 #806

Open
socar-lyla opened this issue Sep 20, 2024 · 0 comments
Open

Celery task does not run when crontab day of week is set to 7 #806

socar-lyla opened this issue Sep 20, 2024 · 0 comments

Comments

@socar-lyla
Copy link

Summary:

Celery task does not run when crontab day of week is set to 7.

  • Celery Version: 5.4.0
  • Celery-Beat Version: 2.6.0

Exact steps to reproduce the issue:

  1. Register a task that runs at any desired time on Sunday.
  2. Crontab's day of week should be set to 7.
  3. Celery task doesn't run.

Detailed information

django_celery_beat/models.py

  • The help_text of day_of_week in the CrontabSchedule model says 'Cron Days Of The Week to Run. Use "*" for "all", Sunday '
    'is 0 or 7, Monday is 1. (Example: "0,5")').
    Screenshot 2024-09-20 at 5 49 12 PM

celery/schedules.py

  • However, description presented in Celery module indicates 0 is translated to Sunday.
    Screenshot 2024-09-20 at 6 03 23 PM
  • In the remaining_delta function as well, Sunday is calculated as 0, not 7
    Screenshot 2024-09-20 at 6 06 50 PM

The comments in django_celery_beat should be modified to reflect this information, or the source code should be modified to ensure the task is sent on Sunday even when the crontab is set to 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant