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


The celery umbrella command.

Preload Options

These options are supported by all commands, and usually parsed before command-specific arguments.

-A, --app

app instance to use (e.g., module.attr_name)

-b, --broker

URL to broker. default is amqp://guest@localhost//


name of custom loader class to use.


Name of the configuration module

-C, --no-color

Disable colors in output.

-q, --quiet

Give less verbose output (behavior depends on the sub command).


Show help and exit.

Daemon Options

These options are supported by commands that can detach into the background (daemon). They will be present in any command that also has a –detach option.

-f, --logfile

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


Optional file used to store the process pid.

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


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


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


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


Optional directory to change to after detaching.


Executable to use for the detached process.

celery inspect

-t, --timeout

Timeout in seconds (float) waiting for reply

-d, --destination

Comma separated list of destination node names.

-j, --json

Use json as output format.

celery control

-t, --timeout

Timeout in seconds (float) waiting for reply

-d, --destination

Comma separated list of destination node names.

-j, --json

Use json as output format.

celery migrate

-n, --limit

Number of tasks to consume (int).

-t, -timeout

Timeout in seconds (float) waiting for tasks.

-a, --ack-messages

Ack messages from source broker.

-T, --tasks

List of task names to filter on.

-Q, --queues

List of queues to migrate.

-F, --forever

Continually migrate tasks until killed.

celery upgrade


Upgrade a Django project.


Maintain backwards compatibility.


Don’t backup original files.

celery shell

-I, --ipython

Force iPython implementation.

-B, --bpython

Force bpython implementation.

-P, --python

Force default Python shell.

-T, --without-tasks

Don’t add tasks to locals.


Use eventlet monkey patches.


Use gevent monkey patches.

celery result

-t, --task

Name of task (if custom backend).


Show traceback if any.

celery purge

-f, --force

Don’t prompt for verification before deleting messages (DANGEROUS)

celery call

-a, --args

Positional arguments (json format).

-k, --kwargs

Keyword arguments (json format).


Scheduled time in ISO-8601 format.


ETA in seconds from now (float/int).


Expiry time in float/int seconds, or a ISO-8601 date.


Specify serializer to use (default is json).


Destination queue.


Destination exchange (defaults to the queue exchange).


Destination routing key (defaults to the queue routing key).

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

Base class for commands.

commands = {'amqp': <class 'celery.bin.amqp.amqp'>, 'beat': <class 'celery.bin.beat.beat'>, 'call': <class ''>, 'control': <class 'celery.bin.control.control'>, 'events': <class ''>, 'graph': <class 'celery.bin.graph.graph'>, 'help': <class ''>, 'inspect': <class 'celery.bin.control.inspect'>, 'list': <class 'celery.bin.list.list_'>, 'logtool': <class 'celery.bin.logtool.logtool'>, 'migrate': <class 'celery.bin.migrate.migrate'>, 'multi': <class 'celery.bin.celery.multi'>, 'purge': <class 'celery.bin.purge.purge'>, 'report': <class ''>, 'result': <class 'celery.bin.result.result'>, 'shell': <class ''>, 'status': <class 'celery.bin.control.status'>, 'upgrade': <class 'celery.bin.upgrade.upgrade'>, 'worker': <class 'celery.bin.worker.worker'>}
enable_config_from_cmdline = True
execute(command, argv=None)[source]

Execute application from command-line.


argv (List[str]) – The list of command-line arguments. Defaults to sys.argv.

ext_fmt = '{self.namespace}.commands'
classmethod get_command_info(command, indent=0, color=None, colored=None, app=None)[source]
handle_argv(prog_name, argv, **kwargs)[source]

Parse arguments from argv and dispatch to run().


Exits with an error message if supports_args is disabled and argv contains positional arguments.

  • prog_name (str) – The program name (argv[0]).

  • argv (List[str]) – Rest of command-line arguments.

classmethod list_commands(indent=0, colored=None, app=None)[source]
namespace = 'celery'
on_usage_error(exc, command=None)[source]
prog_name = 'celery'
classmethod register_command(fun, name=None)[source]

Return tuple of (short_opts, long_opts).

Returns only if the command supports a pool argument, and used to monkey patch eventlet/gevent environments as early as possible.


>>> has_pool_option = (['-P'], ['--pool'])

Start celery umbrella command.