This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.3.

# Timer - `kombu.asynchronous.timer`

Timer scheduling Python callbacks.

class kombu.asynchronous.timer.Entry(fun, args=None, kwargs=None)

  Schedule Entry.

  args
  cancel()
  canceled
  property cancelled
  fun
  kwargs
  tref

class kombu.asynchronous.timer.Timer(max_interval=None, on_error=None, **kwargs)

  Async timer implementation.

  class Entry(fun, args=None, kwargs=None)

    Schedule Entry.

    args
    cancel()
    canceled
    property cancelled
    fun
    kwargs
    tref
  apply_entry(entry)
  call_after(secs, fun, args=(), kwargs=None, priority=0)
  call_at(eta, fun, args=(), kwargs=None, priority=0)
  call_repeatedly(secs, fun, args=(), kwargs=None, priority=0)
  cancel(tref)
  clear()
  enter_after(secs, entry, priority=0, time=<built-in function monotonic>)
  enter_at(entry, eta=None, priority=0, time=<built-in function monotonic>)

    Enter function into the scheduler.

    ## Arguments:

    > entry (~kombu.asynchronous.timer.Entry): Item to enter. eta (datetime.datetime): Scheduled time. priority (int): Unused.

  handle_error(exc_info)
  on_error = None
  property queue

    Snapshot of underlying datastructure.

  property schedule
  stop()

kombu.asynchronous.timer.to_timestamp(d, default_timezone=zoneinfo.ZoneInfo(key='UTC'), time=<built-in function monotonic>)

  Convert datetime to timestamp.

  If d’ is already a timestamp, then that will be used.