This document describes the current stable version of Celery (4.0). For development docs, go here.

celery.bin.beat

The celery beat command.

See also

See Preload Options and Daemon Options.

--detach

Detach and run in the background as a daemon.

-s, --schedule

Path to the schedule database. Defaults to celerybeat-schedule. The extension ‘.db’ may be appended to the filename. Default is {default}.

-S, --scheduler

Scheduler class to use. Default is celery.beat.PersistentScheduler.

--max-interval

Max seconds to sleep between schedule iterations.

-f, --logfile

Path to log file. If no logfile is specified, stderr is used.

-l, --loglevel

Logging level, choose between DEBUG, INFO, WARNING, ERROR, CRITICAL, or FATAL.

--pidfile

Optional file used to store the process pid.

The program won’t start if this file already exists and the pid is still alive.

--uid

User id, or user name of the user to run as after detaching.

--gid

Group id, or group name of the main group to change to after detaching.

--umask

Effective umask (in octal) of the process after detaching. Inherits the umask of the parent process by default.

--workdir

Optional directory to change to after detaching.

--executable

Executable to use for the detached process.

class celery.bin.beat.beat(app=None, get_app=None, no_color=False, stdout=None, stderr=None, quiet=False, on_error=None, on_usage_error=None)[source]

Start the beat periodic task scheduler.

Examples

$ celery beat -l info
$ celery beat -s /var/run/celery/beat-schedule --detach
$ celery beat -S django

The last example requires the django-celery-beat extension package found on PyPI.

add_arguments(parser)[source]
doc = u"The :program:`celery beat` command.\n\n.. program:: celery beat\n\n.. seealso::\n\n See :ref:`preload-options` and :ref:`daemon-options`.\n\n.. cmdoption:: --detach\n\n Detach and run in the background as a daemon.\n\n.. cmdoption:: -s, --schedule\n\n Path to the schedule database. Defaults to `celerybeat-schedule`.\n The extension '.db' may be appended to the filename.\n Default is {default}.\n\n.. cmdoption:: -S, --scheduler\n\n Scheduler class to use.\n Default is :class:`celery.beat.PersistentScheduler`.\n\n.. cmdoption:: --max-interval\n\n Max seconds to sleep between schedule iterations.\n\n.. cmdoption:: -f, --logfile\n\n Path to log file. If no logfile is specified, `stderr` is used.\n\n.. cmdoption:: -l, --loglevel\n\n Logging level, choose between `DEBUG`, `INFO`, `WARNING`,\n `ERROR`, `CRITICAL`, or `FATAL`.\n\n.. cmdoption:: --pidfile\n\n Optional file used to store the process pid.\n\n The program won't start if this file already exists\n and the pid is still alive.\n\n.. cmdoption:: --uid\n\n User id, or user name of the user to run as after detaching.\n\n.. cmdoption:: --gid\n\n Group id, or group name of the main group to change to after\n detaching.\n\n.. cmdoption:: --umask\n\n Effective umask (in octal) of the process after detaching. Inherits\n the umask of the parent process by default.\n\n.. cmdoption:: --workdir\n\n Optional directory to change to after detaching.\n\n.. cmdoption:: --executable\n\n Executable to use for the detached process.\n"
enable_config_from_cmdline = True
run(detach=False, logfile=None, pidfile=None, uid=None, gid=None, umask=None, workdir=None, **kwargs)[source]
supports_args = False