celery.beat

    exception celery.beat.SchedulingError

    An error occured while scheduling a task.

    class celery.beat.ScheduleEntry(name=None, task=None, last_run_at=None, total_run_count=None, schedule=None, args=(), kwargs={}, options={}, relative=False, app=None)[源代码]

    An entry in the scheduler.

    • args = None

      Positional arguments to apply.

    • 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 a new instance of the same class, but with its date and count fields updated.

    • options = None

      Task execution options.

    • schedule = None

      The schedule (run_every/crontab)

    • total_run_count = 0

      Total number of times this task has been scheduled.

    Scheduler for periodic tasks.

    The celery beat program may instantiate this class multiple times for introspection purposes, but then with the lazy argument set. It is important for subclasses to be idempotent when this argument is set.

    • Entry

      ScheduleEntry 的别名

    • add(\*kwargs*)

    • apply_async(entry, publisher=None, \*kwargs*)[源代码]

    • close()

    • connection None[源代码]

    • get_schedule()

    • info None[源代码]

    • install_default_entries(data)

    • logger = <celery.utils.log.ProcessAwareLogger object at 0xc06ad6c>

    • max_interval = 300

      Maximum time to sleep between re-checking the schedule.

    • maybe_due(entry, publisher=None)[源代码]

    • merge_inplace(b)

    • publisher None[源代码]

    • reserve(entry)

    • schedule None

      The schedule dict/shelve.

    • send_task(\args, **kwargs*)[源代码]

    • setup_schedule()

    • should_sync()[源代码]

    • sync()

    • How often to sync the schedule (3 minutes by default)

    • tick()[源代码]

      Run a tick, that is one iteration of the scheduler.

      Executes all due tasks.

    • update_from_dict(dict_)

    class celery.beat.PersistentScheduler(\args, **kwargs*)[源代码]

    • close()

    • get_schedule()[源代码]

    • info None

    • known_suffixes = (‘’, ‘.db’, ‘.dat’, ‘.bak’, ‘.dir’)

    • persistence = <module ‘shelve’ from ‘/usr/lib/python2.7/shelve.pyc’>

    • schedule None

    • set_schedule(schedule)[源代码]

    • setup_schedule()

    • sync()[源代码]

    class celery.beat.Service(app, max_interval=None, schedule_filename=None, scheduler_cls=None)

    celery.beat.EmbeddedService(\args, **kwargs*)

    Return embedded clock service.