Configuration

RedBeat is configured through your Celery application's configuration file (e.g., celeryconfig.py).

Core Settings

Setting Default Value Description
redbeat_redis_url Value of broker_url The Redis connection URL for storing the schedule. It's recommended to use a different Redis database than your Celery broker.
redbeat_key_prefix 'redbeat:' A prefix for all keys created by RedBeat in Redis.
redbeat_lock_key '<redbeat_key_prefix>:lock' The Redis key used for the distributed lock. Set to None to disable the locking mechanism (not recommended for production).
redbeat_lock_timeout beat_max_loop_interval * 5 (1500s) The time in seconds after which the distributed lock will expire if not refreshed. Allows another Beat instance to take over.

Example Configuration

# celeryconfig.py

# Using a different Redis DB for RedBeat
REDBEAT_REDIS_URL = 'redis://localhost:6379/1'

# Custom key prefix for namespacing
REDBEAT_KEY_PREFIX = 'myapp:celery:beat:'

# A shorter lock timeout
REDBEAT_LOCK_TIMEOUT = 300 # 5 minutes

# A faster beat loop is good practice with RedBeat
CELERYBEAT_MAX_LOOP_INTERVAL = 5

Redis Connection Options

For advanced Redis setups like SSL, Sentinel, or Cluster, you can provide additional connection options.

Setting Default Value Description
redbeat_redis_options Value of broker_transport_options A dictionary of keyword arguments passed to the Redis client, used for Sentinel and Cluster configurations. See dedicated pages for examples.
redbeat_redis_use_ssl Value of broker_use_ssl A dictionary of SSL options for connecting to Redis over rediss://. Can also be True for default SSL settings.

For detailed examples, see: