Skip to content

Tasks fired after changing crontab schedule #683

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

Open
yamac-kurtulus opened this issue Oct 3, 2023 · 2 comments
Open

Tasks fired after changing crontab schedule #683

yamac-kurtulus opened this issue Oct 3, 2023 · 2 comments

Comments

@yamac-kurtulus
Copy link

yamac-kurtulus commented Oct 3, 2023

Summary:

I am trying to understand why the tasks are fired immediately after rescheduling by changing the schedule. I have encountered this problem with cron schedule but there is a chance that it would happen with others.

I had a task that's been going on everyday at 13:30 for a long time, I had to change the time to 16:00 PM today before the task triggers (around 12:20pm) When I save the task, it immediately fired, despite the new schedule is after 13:30. Why did this happen? What is the correct way to make such changes? Is this a bug or a feature?

  • Celery Version: 5.3.1
  • Celery-Beat Version: 2.5.0

Exact steps to reproduce the issue:

  1. Create a scheduled task with cron, let it trigger once
  2. Change the crontab to schedule the task to a later time
  3. When you save it, the task triggers immediately although the schedule changed to a later time.
@hottwaj
Copy link

hottwaj commented Nov 30, 2023

Similarly, We have recently had two separate occurrences of django-celery-beat sending tasks that were not due when it was restarted. This is a major issue and we'll likely have to sw

@mark-at-kluster
Copy link

see #537

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

3 participants