Skip to content

Instantly share code, notes, and snippets.

@tijs
Last active December 31, 2015 12:49
Show Gist options
  • Save tijs/7989200 to your computer and use it in GitHub Desktop.
Save tijs/7989200 to your computer and use it in GitHub Desktop.
Our standard celerybeat configuration. Replace { project }, { app } and { app settings } with relevant details. This will of course be different if you use a different project layout.
; ===========================================
; celery beat supervisor example for Django
; ===========================================
[program:celerybeat]
# note: the -s command to set a scheduler is not here since we set it in the settings.py
command = /home/deploy/{ project }/{ app }/venv/bin/python /home/deploy/{ project }/{ app }/{ app root }/manage.py celery beat --loglevel=INFO --settings={ app settings }
# the directory to be in while running this (the directory containing manage.py)
directory = /home/deploy/{ project }/{ app }/{ app root }
user=deploy
numprocs=1
stdout_logfile=/var/log/supervisor/{ project }.celerybeat.log
stderr_logfile=/var/log/supervisor/{ project }.celerybeat_err.log
autostart=true
autorestart=true
startsecs=10
# We usually set the scheduler in the settings with the actual schedules
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment