Home Assistant Unofficial Reference 2024.12.1
homeassistant.core.HassJob Class Reference
Inheritance diagram for homeassistant.core.HassJob:
[legend]
Collaboration diagram for homeassistant.core.HassJob:
[legend]

Public Member Functions

None __init__ (self, Callable[_P, _R_co] target, str|None name=None, *bool|None cancel_on_shutdown=None, HassJobType|None job_type=None)
 
str __repr__ (self)
 
bool|None cancel_on_shutdown (self)
 
HassJobType job_type (self)
 

Public Attributes

 name
 

Private Attributes

 _cancel_on_shutdown
 

Static Private Attributes

 __slots__
 

Detailed Description

Represent a job to be run later.

We check the callable type in advance
so we can avoid checking it every time
we run the job.

Definition at line 336 of file core.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.core.HassJob.__init__ (   self,
Callable[_P, _R_co]  target,
str | None   name = None,
*bool | None   cancel_on_shutdown = None,
HassJobType | None   job_type = None 
)
Create a job object.

Definition at line 346 of file core.py.

Member Function Documentation

◆ __repr__()

str homeassistant.core.HassJob.__repr__ (   self)
Return the job.

Definition at line 374 of file core.py.

◆ cancel_on_shutdown()

bool | None homeassistant.core.HassJob.cancel_on_shutdown (   self)
Return if the job should be cancelled on shutdown.

Definition at line 370 of file core.py.

◆ job_type()

HassJobType homeassistant.core.HassJob.job_type (   self)
Return the job type.

Definition at line 365 of file core.py.

Member Data Documentation

◆ __slots__

homeassistant.core.HassJob.__slots__
staticprivate

Definition at line 344 of file core.py.

◆ _cancel_on_shutdown

homeassistant.core.HassJob._cancel_on_shutdown
private

Definition at line 357 of file core.py.

◆ name

homeassistant.core.HassJob.name

Definition at line 356 of file core.py.


The documentation for this class was generated from the following file: