0

An example celerybeat conf file looks like this

[program:celerybeat]
; Set full path to celery program if using virtualenv
command=celery beat -A myapp --schedule /var/lib/celery/beat.db --loglevel=INFO

; remove the -A myapp argument if you are not using an app instance

directory=/path/to/project
user=nobody
numprocs=1
stdout_logfile=/var/log/celery/beat.log
stderr_logfile=/var/log/celery/beat.log
autostart=true
autorestart=true
startsecs=10

; if rabbitmq is supervised, set its priority higher
; so it starts first
priority=999

How would I use celerybeat to schedule the CELERYBEAT_SCHEDULE = {} in my django settings file. What would I change --schedule /var/lib/celery/beat.db to? Thanks

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
PiccolMan
  • 4,854
  • 12
  • 35
  • 53

1 Answers1

1

If I understand the documentation well you have to write

CELERYBEAT_SCHEDULE_FILENAME = '/var/lib/celery/beat.db'
Xebax
  • 432
  • 4
  • 11
  • Would I replace FILENAME with say settings, since my CELERYBEAT_SCHEDULE is in my settings.py file? – PiccolMan Aug 31 '15 at 23:04
  • I'm afraid I'm not sure to understand your question. In settings.py you use `CELERYBEAT_SCHEDULE` to define your schedule (see [Entries](http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#beat-entries) in the doc). `CELERYBEAT_SCHEDULE_FILENAME` is something else, it defines "the file used by PersistentScheduler to store the last run times of periodic tasks". Do you use the PersistentScheduler or another one ? – Xebax Sep 02 '15 at 06:29