Questions tagged [celerybeat]

The Celery periodic task scheduler

Celery beat is a scheduler for periodic tasks in Celery. It provides useful functions to create and execute tasks on certain intervals, with support for fail-over, retries, status tracking etc. For more info look at project documentation: http://celery.github.com/celery/internals/reference/celery.beat.html

514 questions
8
votes
2 answers

Celery dies with DBPageNotFoundError

I have 3 machines with celery workers and rabbitmq as a broker, one worker is running with beat flag, all of this is managed by supervisor, and sometimes celery dies with such error. This error appears only on beat worker, but when it appears,…
lwolf
  • 960
  • 9
  • 16
8
votes
1 answer

How to schedule weekday-aware jobs in celery

Is it possible to configure a sophisticated schedule with celery beat? For example, something like this: On Monday-Friday, do job A with parameters (x1, y1), then do job B On Saturday, Sunday, do job A with parameters (x2, y2), don't do job B I know…
Goro
  • 9,919
  • 22
  • 74
  • 108
8
votes
1 answer

Dynamically Changing Celery Beat Settings

Is there a way to tell celerybeat to change settings for a specific task while it is running? The utility of this is best illustrated in this example: I have a periodic task that checks a value every 30 seconds. Sometimes, based on an external…
Goro
  • 9,919
  • 22
  • 74
  • 108
7
votes
1 answer

Python Celery inconsistent cronjob timing for task scheduling with now function

The situation I have a celery task I am running at different timezone for each customer. Basically, for each customer in my database, I get the timezone, and then I set up the celery task this way. 'schedule': crontab(minute=30, hour=14,…
Espoir Murhabazi
  • 5,973
  • 5
  • 42
  • 73
7
votes
0 answers

How to dynamically change the schedule of celery beat?

I am using Celery 4.3.0. I am trying to update the schedule of celery beat every 5 seconds based on a schedule in a json file, so that when I’m manually editing, adding or deleting scheduled tasks in that json file, the changes are picked up by the…
Mathieu Rollet
  • 2,016
  • 2
  • 18
  • 31
7
votes
1 answer

Celery beat running tasks every minute even thought It's set for every two hours

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': { …
magnoz
  • 1,939
  • 5
  • 22
  • 42
7
votes
1 answer

Why does Celery discourage worker & beat together?

From the celery help function: > celery worker -h ... Embedded Beat Options: -B, --beat Also run the celery beat periodic task scheduler. Please note that there must only be one instance of this service. ..…
zerohedge
  • 3,185
  • 4
  • 28
  • 63
7
votes
2 answers

celerybeat how to pass arguments via scheduler to functions?

im having trouble passing arguments to my functions via celerybeat schedule. After searching it looks as though I should be able to pass them with the args command but im getting errors as per the below. can anyone point me in the right…
AlexW
  • 2,843
  • 12
  • 74
  • 156
7
votes
1 answer

Checking the next run time for scheduled periodic tasks in Celery (with Django)

*Using celery 3.1.25 because django-celery-beat 1.0.1 has an issue with scheduling periodic tasks. Recently I encountered an issue with celerybeat whereby periodic tasks with an interval of a day or longer appear to be 'forgotten' by the scheduler.…
FatHippo
  • 177
  • 3
  • 12
7
votes
1 answer

How to resolve this error? "RestartFreqExceeded: 5 in 1s" in django+celery+rabbitmq+mysql+redis

So I am using django with celery. rabbitmq is the broker. redis is the cache. mysql is the db. (everything in localhost) I am using python2.7 and using virtualenv based virtual environment I start the redis server (local) at default port In a new…
TheRajVJain
  • 390
  • 5
  • 15
7
votes
1 answer

Where does CELERYBEAT_SCHEDULE go in your project?

I've read several pages of Google results multiple times and I'm very confused about how to layout my project. I have managed to get Celerybeat working using the periodic_task decorator, but that is depreciated and is being removed. From what I…
Bruno Bronosky
  • 66,273
  • 12
  • 162
  • 149
7
votes
2 answers

Can celery celerybeat use a Database Scheduler without Django?

I have a small infrastructure plan that does not include Django. But, because of my experience with Django, I really like Celery. All I really need is Redis + Celery to make my project. Instead of using the local filesystem, I'd like to keep…
Bruno Bronosky
  • 66,273
  • 12
  • 162
  • 149
7
votes
1 answer

Celerybeat shuts down immediately after start

I have a django app that is using celeryd and celerybeat. Both are set up to run as daemons. The celerybeat tasks won't get executed because celerybeat does not start correctly. According to the logs it shuts down immediately: [2012-05-04…
sbaechler
  • 1,329
  • 14
  • 21
6
votes
1 answer

Django Celery with Redis Issues on Digital Ocean App Platform

After quite a bit of trial and error and a step by step attempt to find solutions I thought I share the problems here and answer them myself according to what I've found. There is not too much documentation on this anywhere except small bits and…
sebieire
  • 418
  • 2
  • 11
6
votes
1 answer

Celery Tasks on Django Models

I'm trying to learn how to use celery to check a date every day on one of my models. One of my models holds an expiration date and a boolean field that says whether their insurance is expired or not. The model is pretty big so I'm going to post a…
Kris Tryber
  • 227
  • 1
  • 8
  • 21