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

Heroku restart ignores Scheduled time and starts the task #30

Open
mastizada opened this issue Dec 28, 2018 · 3 comments
Open

Heroku restart ignores Scheduled time and starts the task #30

mastizada opened this issue Dec 28, 2018 · 3 comments
Labels

Comments

@mastizada
Copy link

Heroku has a daily restart for its apps. Our Django-rq-scheduler tasks are starting right after each restart and also at the time that we added. Also, it even starts if enabled field is False.

How to check if it is django-rq-scheduler problem or django-rq or rq?

@tom-price
Copy link
Collaborator

I'm looking into this. Can you confirm the job type? I've currently fixing an issue w. repeatable jobs where on re-scheduling they can end up re-running the tasks.

@mastizada
Copy link
Author

Hi @tom-price , they were "Repeatable Job"s added in django admin, as heroku dynos has a daily restart, at each restart tasks were automatically started ignored their scheduled time. We had to switch to appscheduler+django-rq, no it works as should be, but tasks cannot be managed in admin, we are planning to switch to celery, celery-beat and rabbitmq in near future for stability, better task statistics and flexibility.

"where on re-scheduling they can end up re-running the tasks" - yes, looks like it is the problem we had.

@tom-price
Copy link
Collaborator

Ahh I see. It do believe PR #34 addresses this issue.
My understanding is when you schedule a task with a start time in the past using if there are remaining repeats then it tries to start running right away. The change made mentioned above essentially steps the scheduled time forwards in increments of the interval until there are either no repeats remaining or a new scheduled time in the future is arrived at.

@g3rd g3rd added the bug label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants