Job(callback, context=None, name=None, job_queue=None, job=None)¶
This class is a convenience wrapper for the jobs held in a
telegram.ext.JobQueue. With the current backend APScheduler,
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
All attributes and instance methods of
jobare also directly available as attributes/methods of the corresponding
Two instances of
telegram.ext.Jobare considered equal, if their corresponding
jobattributes have the same
jobisn’t passed on initialization, it must be set manually afterwards for this
telegram.ext.Jobto be useful.
The callback function that should be executed by the new job. Callback signature for context based API:
telegram.ext.Jobinstance. It can be used to access its
job.contextor change it to a repeating job.
object, optional) – Additional data needed for the callback function. Can be accessed through
job.contextin the callback. Defaults to
str, optional) – The name of the new job. Defaults to
telegram.ext.JobQueue, optional) – The
JobQueuethis job belongs to. Only optional for backward compatibility with
apscheduler.job.Job, optional) – The APS Job this job is a wrapper for.
The callback function that should be executed by the new job.
Optional. Additional data needed for the callback function.
Optional. The name of the new job.
JobQueuethis job belongs to.
Optional. The APS Job this job is a wrapper for.
Whether this job is enabled.
Datetime for the next job execution. Datetime is localized according to
tzinfo. If job is removed or already ran it equals to
Whether this job is due to be removed.
Executes the callback function independently of the jobs schedule.
Schedules this job for removal from the
JobQueue. It will be removed without executing its callback function again.