BaseScheduler#
- class scheduler.base.scheduler.BaseScheduler(logger: Logger | None = None)[source]#
Bases:
ABC
Interface definition of an abstract scheduler.
Author: Jendrik A. Potyka, Fabian A. Preiss
Methods
__init__
([logger])cyclic
(timing, handle, **kwargs)Schedule a cyclic
BaseJob
.daily
(timing, handle, **kwargs)Schedule a daily
BaseJob
.delete_job
(job)Delete a
BaseJob
from the BaseScheduler.delete_jobs
([tags, any_tag])Delete a set of
BaseJob
s from the BaseScheduler by tags.get_jobs
([tags, any_tag])Get a set of
BaseJob
s from the BaseScheduler by tags.hourly
(timing, handle, **kwargs)Schedule an hourly
BaseJob
.minutely
(timing, handle, **kwargs)Schedule a minutely
BaseJob
.once
(timing, handle, *[, args, kwargs, tags])Schedule a oneshot
BaseJob
.weekly
(timing, handle, **kwargs)Schedule a weekly
BaseJob
.Attributes
- abstract cyclic(timing: timedelta, handle: Callable[[...], None], **kwargs) BaseJob [source]#
Schedule a cyclic
BaseJob
.
- abstract daily(timing: time | list[datetime.time], handle: Callable[[...], None], **kwargs) BaseJob [source]#
Schedule a daily
BaseJob
.
- abstract delete_jobs(tags: set[str] | None = None, any_tag: bool = False) int [source]#
Delete a set of
BaseJob
s from the BaseScheduler by tags.
- abstract get_jobs(tags: set[str] | None = None, any_tag: bool = False) set[scheduler.base.job.BaseJob] [source]#
Get a set of
BaseJob
s from the BaseScheduler by tags.
- abstract hourly(timing: time | list[datetime.time], handle: Callable[[...], None], **kwargs) BaseJob [source]#
Schedule an hourly
BaseJob
.
- abstract property jobs: set[scheduler.base.job.BaseJob]#
Get the set of all
BaseJob
s.
- abstract minutely(timing: time | list[datetime.time], handle: Callable[[...], None], **kwargs) BaseJob [source]#
Schedule a minutely
BaseJob
.