I'm trying to use celery beat to run tasks daily at a specific time. However for testing purposes, I'm setting up two tasks to run every two hours, this is what my config looks like:
CELERYBEAT_SCHEDULE = {
'daily-google-connect': {
'task': 'app.engine.schedule_fetcher',
'schedule': crontab(hour='*/2'),
'args': (['G'])
},
'daily-facebook-connect': {
'task': 'app.engine.schedule_fetcher',
'schedule': crontab(hour='*/2'),
'args': (['F'])
}
}
This is how I run celery:
celery beat -A app.engine.celery --schedule=/tmp/celerybeat-schedule --pidfile=/tmp/celerybeat.pid -l info
Everything runs in Docker containers using docker-compose so I make sure that I re-build the app's image and restart the containers.
I even enter into the running container and I see the crontab setup in the code... however in my logs, I see the task running every minute.
What else can I do to debug this?
I appreciate any help,
Thanks