|
@@ -157,6 +157,42 @@ The syntax of these crontab expressions are very flexible. Some examples:
|
|
|
| | every hour during office hours (8am-5pm). |
|
|
|
+-----------------------------------------+--------------------------------------------+
|
|
|
|
|
|
+.. _beat-timezones:
|
|
|
+
|
|
|
+Timezones
|
|
|
+=========
|
|
|
+
|
|
|
+By default the current local timezone is used, but you can also set a specific
|
|
|
+timezone by enabling the :setting:`CELERY_ENABLE_UTC` setting and configuring
|
|
|
+the :setting:`CELERY_TIMEZONE` setting:
|
|
|
+
|
|
|
+.. code-block:: python
|
|
|
+
|
|
|
+ CELERY_ENABLE_UTC = True
|
|
|
+ CELERY_TIMEZONE = "Europe/London"
|
|
|
+
|
|
|
+.. admonition:: Django Users
|
|
|
+
|
|
|
+ For Django users the timezone specified in the ``TIME_ZONE`` setting
|
|
|
+ will be used, but *not if the :setting:`CELERY_ENABLE_UTC` setting is
|
|
|
+ enabled*.
|
|
|
+
|
|
|
+ Celery is also compatible with the new ``USE_TZ`` setting introduced
|
|
|
+ in Django 1.4.
|
|
|
+
|
|
|
+.. note::
|
|
|
+
|
|
|
+ The `pytz`_ library is recommended when setting a default timezone.
|
|
|
+ If :mod:`pytz` is not installed it will fallback to the mod:`dateutil`
|
|
|
+ library, which depends on a system timezone file being available for
|
|
|
+ the timezone selected.
|
|
|
+
|
|
|
+ Timezone definitions change frequently, so for the best results
|
|
|
+ an up to date :mod:`pytz` installation should be used.
|
|
|
+
|
|
|
+
|
|
|
+.. _`pytz`: http://pypi.python.org/pypi/pytz/
|
|
|
+
|
|
|
.. _beat-starting:
|
|
|
|
|
|
Starting celerybeat
|