celery.beat
The periodic task scheduler.
- celery.beat.EmbeddedService(app, max_interval=None, **kwargs)
-
Return embedded clock service.
- Parameters:
-
thread (bool) – Run threaded instead of as a separate process. Uses
multiprocessingby default, if available.
- classcelery.beat.PersistentScheduler(*args, **kwargs)
-
Scheduler backed by
shelvedatabase.- close()
- get_schedule()
- propertyinfo
- known_suffixes=('', '.db', '.dat', '.bak', '.dir')
- persistence=<module 'shelve' from '/home/docs/.asdf/installs/python/3.9.22/lib/python3.9/shelve.py'>
- propertyschedule
- set_schedule(schedule)
- setup_schedule()
- sync()
- classcelery.beat.ScheduleEntry(name=None, task=None, last_run_at=None, total_run_count=None, schedule=None, args=(), kwargs=None, options=None, relative=False, app=None)
-
An entry in the scheduler.
- Parameters:
- args=None
-
Positional arguments to apply.
- default_now()
- editable_fields_equal(other)
- is_due()
-
See
is_due().
- kwargs=None
-
Keyword arguments to apply.
- last_run_at=None
-
The time and date of when this task was last scheduled.
- name=None
-
The task name
- next(last_run_at=None)
-
Return new instance, with date and count fields updated.
- options=None
-
Task execution options.
- schedule=None
-
The schedule (
schedule)
- total_run_count=0
-
Total number of times this task has been scheduled.
- update(other)
-
Update values from another entry.
- Will only update “editable” fields:
-
task,schedule,args,kwargs,options.
- classcelery.beat.Scheduler(app, schedule=None, max_interval=None, Producer=None, lazy=False, sync_every_tasks=None, **kwargs)
-
Scheduler for periodic tasks.
The celery beat program may instantiate this class multiple times for introspection purposes, but then with the
lazyargument set. It’s important for subclasses to be idempotent when this argument is set.- Parameters:
-
max_interval (int) – see
max_interval.lazy (bool) – Don’t set up the schedule.
- Entry
-
alias of
ScheduleEntry
- add(**kwargs)
- adjust(n, drift=-0.01)
- apply_async(entry, producer=None, advance=True, **kwargs)
- apply_entry(entry, producer=None)
- close()
- propertyconnection
- get_schedule()
- propertyinfo
- install_default_entries(data)
- is_due(entry)
- logger=<Logger celery.beat (WARNING)>
- max_interval=300
-
Maximum time to sleep between re-checking the schedule.
- merge_inplace(b)
- populate_heap(event_t=<class 'celery.beat.event_t'>, heapify=<built-in function heapify>)
-
Populate the heap with the data contained in the schedule.
- propertyproducer
- reserve(entry)
- propertyschedule
-
The schedule dict/shelve.
- schedules_equal(old_schedules, new_schedules)
- send_task(*args, **kwargs)
- set_schedule(schedule)
- setup_schedule()
- should_sync()
- sync()
- sync_every=180
-
How often to sync the schedule (3 minutes by default)
- sync_every_tasks=None
-
How many tasks can be called before a sync is forced.
- tick(event_t=<class 'celery.beat.event_t'>, min=<built-in function min>, heappop=<built-in function heappop>, heappush=<built-in function heappush>)
-
Run a tick - one iteration of the scheduler.
Executes one due task per call.
- Returns:
-
preferred delay in seconds for next call.
- Return type:
- update_from_dict(dict_)
- exceptioncelery.beat.SchedulingError
-
An error occurred while scheduling a task.
- classcelery.beat.Service(app, max_interval=None, schedule_filename=None, scheduler_cls=None)
-
Celery periodic task service.
- get_scheduler(lazy=False, extension_namespace='celery.beat_schedulers')
- propertyscheduler
- scheduler_cls
-
alias of
PersistentScheduler
- start(embedded_process=False)
- stop(wait=False)
- sync()
Copyright © 2017-2026 Asif Saif Uddin, core team & contributors. All rights reserved.
Celery is licensed under The BSD License (3 Clause, also known as the new BSD license). The license is an OSI approved Open Source license and is GPL-compatible.
https://docs.celeryq.dev/en/stable/reference/celery.beat.html