Class reference
Reference for returned classes from some functions. These are not intended to be created by the user.
Watches
ItemNoUpdateWatch
- class ItemNoUpdateWatch(name, secs)
- EVENT
alias of
ItemNoUpdateEvent
- cancel()
Cancel the item watch
- listen_event(callback)
Listen to (only) the event that is emitted by this watcher
ItemNoChangeWatch
- class ItemNoChangeWatch(name, secs)
- EVENT
alias of
ItemNoChangeEvent
- cancel()
Cancel the item watch
- listen_event(callback)
Listen to (only) the event that is emitted by this watcher
Scheduler
OneTimeJob
- class OneTimeJob(parent, func)
- cancel()
Cancel the job.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable
CountdownJob
- class CountdownJob(parent, func)
- cancel()
Cancel the job.
- countdown(time)
Set the time after which the job will be executed.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- stop()
Stops the countdown so it can be started again with a call to reset
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable
ReoccurringJob
- class ReoccurringJob(parent, func)
- boundary_func(func)
Add a function which will be called when the datetime changes. Use this to implement custom boundaries. Use
None
to disable the boundary function.
- cancel()
Cancel the job.
- earliest(time_obj)
Set earliest boundary as time of day.
None
will disable boundary.
- interval(interval)
Set the interval at which the task will run.
- jitter(start, stop=None)
Add a random jitter per call in the interval [start <= secs <= stop] to the next run. If stop is omitted start must be positive and the interval will be [-start <= secs <= start] Passing
None
as start will disable jitter.
- latest(time_obj)
Set latest boundary as time of day.
None
will disable boundary.
- offset(timedelta_obj)
Set a constant offset to the calculation of the next run.
None
will disable the offset.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable
DayOfWeekJob
- class DayOfWeekJob(parent, func)
- boundary_func(func)
Add a function which will be called when the datetime changes. Use this to implement custom boundaries. Use
None
to disable the boundary function.
- cancel()
Cancel the job.
- earliest(time_obj)
Set earliest boundary as time of day.
None
will disable boundary.
- jitter(start, stop=None)
Add a random jitter per call in the interval [start <= secs <= stop] to the next run. If stop is omitted start must be positive and the interval will be [-start <= secs <= start] Passing
None
as start will disable jitter.
- latest(time_obj)
Set latest boundary as time of day.
None
will disable boundary.
- offset(timedelta_obj)
Set a constant offset to the calculation of the next run.
None
will disable the offset.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- time(time)
Set a time of day when the job will run.
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable
- weekdays(weekdays)
Set the weekdays when the job will run.
DawnJob
- class DawnJob(parent, func)
- boundary_func(func)
Add a function which will be called when the datetime changes. Use this to implement custom boundaries. Use
None
to disable the boundary function.
- cancel()
Cancel the job.
- earliest(time_obj)
Set earliest boundary as time of day.
None
will disable boundary.
- jitter(start, stop=None)
Add a random jitter per call in the interval [start <= secs <= stop] to the next run. If stop is omitted start must be positive and the interval will be [-start <= secs <= start] Passing
None
as start will disable jitter.
- latest(time_obj)
Set latest boundary as time of day.
None
will disable boundary.
- offset(timedelta_obj)
Set a constant offset to the calculation of the next run.
None
will disable the offset.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable
SunriseJob
- class SunriseJob(parent, func)
- boundary_func(func)
Add a function which will be called when the datetime changes. Use this to implement custom boundaries. Use
None
to disable the boundary function.
- cancel()
Cancel the job.
- earliest(time_obj)
Set earliest boundary as time of day.
None
will disable boundary.
- jitter(start, stop=None)
Add a random jitter per call in the interval [start <= secs <= stop] to the next run. If stop is omitted start must be positive and the interval will be [-start <= secs <= start] Passing
None
as start will disable jitter.
- latest(time_obj)
Set latest boundary as time of day.
None
will disable boundary.
- offset(timedelta_obj)
Set a constant offset to the calculation of the next run.
None
will disable the offset.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable
SunsetJob
- class SunsetJob(parent, func)
- boundary_func(func)
Add a function which will be called when the datetime changes. Use this to implement custom boundaries. Use
None
to disable the boundary function.
- cancel()
Cancel the job.
- earliest(time_obj)
Set earliest boundary as time of day.
None
will disable boundary.
- jitter(start, stop=None)
Add a random jitter per call in the interval [start <= secs <= stop] to the next run. If stop is omitted start must be positive and the interval will be [-start <= secs <= start] Passing
None
as start will disable jitter.
- latest(time_obj)
Set latest boundary as time of day.
None
will disable boundary.
- offset(timedelta_obj)
Set a constant offset to the calculation of the next run.
None
will disable the offset.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable
DuskJob
- class DuskJob(parent, func)
- boundary_func(func)
Add a function which will be called when the datetime changes. Use this to implement custom boundaries. Use
None
to disable the boundary function.
- cancel()
Cancel the job.
- earliest(time_obj)
Set earliest boundary as time of day.
None
will disable boundary.
- jitter(start, stop=None)
Add a random jitter per call in the interval [start <= secs <= stop] to the next run. If stop is omitted start must be positive and the interval will be [-start <= secs <= start] Passing
None
as start will disable jitter.
- latest(time_obj)
Set latest boundary as time of day.
None
will disable boundary.
- offset(timedelta_obj)
Set a constant offset to the calculation of the next run.
None
will disable the offset.
- remaining()
Returns the remaining time to the next run or None if the job is not scheduled
- to_item(item)
Sends the next execution (date)time to an item. Sends
None
if the job is not scheduled. Every time the scheduler updates to a new (date)time the item will also receive the updated time.- Parameters:
item (
str
|BaseValueItem
|None
) – item name or item,None
to disable