# `django_celery_beat.models`

Database models.

class django_celery_beat.models.ClockedSchedule(*args, **kwargs)

  clocked schedule.

  exception DoesNotExist
  exception MultipleObjectsReturned
  clocked_time

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  classmethod from_schedule(schedule)
  get_next_by_clocked_time(*, field=<django.db.models.fields.DateTimeField: clocked_time>, is_next=True, **kwargs)
  get_previous_by_clocked_time(*, field=<django.db.models.fields.DateTimeField: clocked_time>, is_next=False, **kwargs)
  id

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  objects = <django.db.models.manager.Manager object>
  periodictask_set

    Accessor to the related objects manager on the reverse side of a many-to-one relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Parent.children` is a `ReverseManyToOneDescriptor` instance.

    Most of the implementation is delegated to a dynamically defined manager class built by `create_forward_many_to_many_manager()` defined below.

  property schedule

class django_celery_beat.models.CrontabSchedule(*args, **kwargs)

  Timezone Aware Crontab-like schedule.

  Example: Run every hour at 0 minutes for days of month 10-15:

      >>> minute="0", hour="*", day_of_week="*",
      ... day_of_month="10-15", month_of_year="*"

  exception DoesNotExist
  exception MultipleObjectsReturned
  day_of_month

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  day_of_week

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  classmethod from_schedule(schedule)
  get_timezone_display(*, field=<timezone_field.fields.TimeZoneField: timezone>)
  hour

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  property human_readable
  id

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  minute

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  month_of_year

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  objects = <django.db.models.manager.Manager object>
  periodictask_set

    Accessor to the related objects manager on the reverse side of a many-to-one relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Parent.children` is a `ReverseManyToOneDescriptor` instance.

    Most of the implementation is delegated to a dynamically defined manager class built by `create_forward_many_to_many_manager()` defined below.

  property schedule
  timezone

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class django_celery_beat.models.IntervalSchedule(*args, **kwargs)

  Schedule executing on a regular interval.

  Example: execute every 2 days:

      >>> every=2, period=DAYS

  DAYS = 'days'
  exception DoesNotExist
  HOURS = 'hours'
  MICROSECONDS = 'microseconds'
  MINUTES = 'minutes'
  exception MultipleObjectsReturned
  PERIOD_CHOICES = (('days', 'Days'), ('hours', 'Hours'), ('minutes', 'Minutes'), ('seconds', 'Seconds'), ('microseconds', 'Microseconds'))
  SECONDS = 'seconds'
  every

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  classmethod from_schedule(schedule, period='seconds')
  get_period_display(*, field=<django.db.models.fields.CharField: period>)
  id

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  objects = <django.db.models.manager.Manager object>
  period

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  property period_singular
  periodictask_set

    Accessor to the related objects manager on the reverse side of a many-to-one relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Parent.children` is a `ReverseManyToOneDescriptor` instance.

    Most of the implementation is delegated to a dynamically defined manager class built by `create_forward_many_to_many_manager()` defined below.

  property schedule

class django_celery_beat.models.PeriodicTask(*args, **kwargs)

  Model representing a periodic task.

  exception DoesNotExist
  exception MultipleObjectsReturned
  args

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  clocked

    Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Child.parent` is a `ForwardManyToOneDescriptor` instance.

  clocked_id
  crontab

    Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Child.parent` is a `ForwardManyToOneDescriptor` instance.

  crontab_id
  date_changed

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  delete(*args, **kwargs)
  description

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  enabled

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  exchange

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  expire_seconds

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  expires

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  property expires_
  get_next_by_date_changed(*, field=<django.db.models.fields.DateTimeField: date_changed>, is_next=True, **kwargs)
  get_previous_by_date_changed(*, field=<django.db.models.fields.DateTimeField: date_changed>, is_next=False, **kwargs)
  headers

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  id

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  interval

    Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Child.parent` is a `ForwardManyToOneDescriptor` instance.

  interval_id
  kwargs

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  last_run_at

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  name

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  no_changes = False
  o2otoperiodictasks

    Accessor to the related object on the reverse side of a one-to-one relation.

    In the example:

        class Restaurant(Model):
            place = OneToOneField(Place, related_name='restaurant')

    `Place.restaurant` is a `ReverseOneToOneDescriptor` instance.

  objects = <django.db.models.manager.ManagerFromPeriodicTaskQuerySet object>
  one_off

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  priority

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  queue

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  routing_key

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  save(*args, **kwargs)

    Save the current instance. Override this in a subclass if you want to control the saving process.

    The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

  property schedule
  property scheduler
  solar

    Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Child.parent` is a `ForwardManyToOneDescriptor` instance.

  solar_id
  start_time

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  task

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  total_run_count

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  validate_unique(*args, **kwargs)

    Check unique constraints on the model and raise ValidationError if any failed.

class django_celery_beat.models.PeriodicTasks(*args, **kwargs)

  Helper table for tracking updates to periodic tasks.

  This stores a single row with `ident=1`. `last_update` is updated via signals whenever anything changes in the `PeriodicTask` model. Basically this acts like a DB data audit trigger. Doing this so we also track deletions, and not just insert/update.

  exception DoesNotExist
  exception MultipleObjectsReturned
  classmethod changed(instance, **kwargs)
  get_next_by_last_update(*, field=<django.db.models.fields.DateTimeField: last_update>, is_next=True, **kwargs)
  get_previous_by_last_update(*, field=<django.db.models.fields.DateTimeField: last_update>, is_next=False, **kwargs)
  ident

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  classmethod last_change()
  last_update

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  objects = <django.db.models.manager.Manager object>
  classmethod update_changed(**kwargs)

class django_celery_beat.models.SolarSchedule(*args, **kwargs)

  Schedule following astronomical patterns.

  Example: to run every sunrise in New York City:

      >>> event='sunrise', latitude=40.7128, longitude=74.0060

  exception DoesNotExist
  exception MultipleObjectsReturned
  event

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  classmethod from_schedule(schedule)
  get_event_display(*, field=<django.db.models.fields.CharField: event>)
  id

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  latitude

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  longitude

    A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

  objects = <django.db.models.manager.Manager object>
  periodictask_set

    Accessor to the related objects manager on the reverse side of a many-to-one relation.

    In the example:

        class Child(Model):
            parent = ForeignKey(Parent, related_name='children')

    `Parent.children` is a `ReverseManyToOneDescriptor` instance.

    Most of the implementation is delegated to a dynamically defined manager class built by `create_forward_many_to_many_manager()` defined below.

  property schedule

django_celery_beat.models.cronexp(field)

  Representation of cron expression.

django_celery_beat.models.crontab_schedule_celery_timezone()

  Return timezone string from Django settings `CELERY_TIMEZONE` variable.

  If is not defined or is not a valid timezone, return `"UTC"` instead.