Question

I'm trying to test out some periodic tasks I'm running in Celery, which are supposed to run at midnight of the first day of each month. To test these, I have a cron job running every few minutes which bumps the system time up to a few minutes before midnight on the last day of the month. When the clock strikes midnight (every few minutes), the tasks are not run.

All the times are UTC, and celery is set to UTC mode.

Celery itself is working fine, I can run the tasks manually. What might be going on here? Also, how does celery keep track of the system time for its scheduling, how does it handle a system time update? Could it be that celery's time and the system time get out of sync somehow?

This is Celery 3.1.0 with redis as broker/backend

Was it helpful?

Solution

The solution for me was to restart redis after the time update, and also restart celerybeat. That combination seems to work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top