Clock Service - celery.beat

Periodic Task Scheduler

class celery.beat.ClockService(logger=None, max_interval=300, schedule_filename='celerybeat-schedule')
open_schedule(filename)
schedule
scheduler
scheduler_cls

alias of Scheduler

start(embedded_process=False)
stop(wait=False)
sync()
celery.beat.EmbeddedClockService(*args, **kwargs)

Return embedded clock service.

Parameters:
  • thread – Run threaded instead of as a separate process. Default is False.
class celery.beat.ScheduleEntry(name, last_run_at=None, total_run_count=None)

An entry in the scheduler.

Parameters:
task

The task class.

last_run_at

The time and date of when this task was last run.

total_run_count

Total number of times this periodic task has been executed.

is_due(task)

See celery.task.base.PeriodicTask.is_due().

next()

Returns a new instance of the same class, but with its date and count fields updated.

class celery.beat.Scheduler(registry=None, schedule=None, logger=None, max_interval=None)

Scheduler for periodic tasks.

Parameters:
registry

The task registry to use.

schedule

The schedule dict/shelve.

logger

The logger to use.

max_interval

Maximum time to sleep between re-checking the schedule.

apply_async(entry, **kwargs)
cleanup()
get_task(name)
is_due(entry)
schedule
schedule_registry()

Add the current contents of the registry to the schedule.

tick()

Run a tick, that is one iteration of the scheduler. Executes all due tasks.

exception celery.beat.SchedulingError

An error occured while scheduling a task.

Previous topic

Thread Pool Support EXPERIMENTAL - celery.concurrency.threads

Next topic

Backends - celery.backends

This Page