Class reference¶
Reference for returned classes from some functions. These are not intended to be created by the user.
Watches¶
ItemNoUpdateWatch¶
ItemNoChangeWatch¶
Scheduler¶
OneTimeJob¶
CountdownJob¶
ReoccurringJob¶
- class eascheduler.jobs.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.- Parameters
func (
Optional
[Callable
[[datetime
],datetime
]]) – Function which returns a datetime obj, arg is a datetime with the next run time. ReturnSKIP_EXECUTION
together with a reoccurring job to skip the proposed run time.- Return type
DateTimeJobBase
- cancel()¶
Cancel the job.
- earliest(time_obj)¶
Set earliest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run earlier- Return type
DateTimeJobBase
- get_next_run()¶
Return the next execution timestamp.
- Return type
datetime
- interval(interval)¶
Set the interval at which the task will run.
- Parameters
interval (
Union
[int
,float
,timedelta
]) – interval in secs or a timedelta obj- Return type
- 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.- Parameters
start (
Union
[int
,float
,None
]) – Interval start orNone
to disable jitterstop (
Union
[int
,float
,None
]) – Interval stop orNone
to build interval based on start
- Return type
DateTimeJobBase
- latest(time_obj)¶
Set latest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run later- Return type
DateTimeJobBase
- offset(timedelta_obj)¶
Set a constant offset to the calculation of the next run.
None
will disable the offset.- Parameters
timedelta_obj (
Optional
[timedelta
]) – constant offset- Return type
DateTimeJobBase
DayOfWeekJob¶
- class eascheduler.jobs.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.- Parameters
func (
Optional
[Callable
[[datetime
],datetime
]]) – Function which returns a datetime obj, arg is a datetime with the next run time. ReturnSKIP_EXECUTION
together with a reoccurring job to skip the proposed run time.- Return type
DateTimeJobBase
- cancel()¶
Cancel the job.
- earliest(time_obj)¶
Set earliest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run earlier- Return type
DateTimeJobBase
- get_next_run()¶
Return the next execution timestamp.
- Return type
datetime
- 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.- Parameters
start (
Union
[int
,float
,None
]) – Interval start orNone
to disable jitterstop (
Union
[int
,float
,None
]) – Interval stop orNone
to build interval based on start
- Return type
DateTimeJobBase
- latest(time_obj)¶
Set latest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run later- Return type
DateTimeJobBase
- offset(timedelta_obj)¶
Set a constant offset to the calculation of the next run.
None
will disable the offset.- Parameters
timedelta_obj (
Optional
[timedelta
]) – constant offset- Return type
DateTimeJobBase
- time(time)¶
Set a time of day when the job will run.
- Parameters
time (
Union
[time
,datetime
]) – time- Return type
- weekdays(weekdays)¶
Set the weekdays when the job will run.
- Parameters
weekdays (
Union
[str
,Iterable
[Union
[str
,int
]]]) – Day group names (e.g.'all'
,'weekend'
,'workdays'
), an iterable with day names (e.g.['Mon', 'Fri']
) or an iterable with the isoweekday values (e.g.[1, 5]
).- Return type
DawnJob¶
- class eascheduler.jobs.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.- Parameters
func (
Optional
[Callable
[[datetime
],datetime
]]) – Function which returns a datetime obj, arg is a datetime with the next run time. ReturnSKIP_EXECUTION
together with a reoccurring job to skip the proposed run time.- Return type
DateTimeJobBase
- cancel()¶
Cancel the job.
- earliest(time_obj)¶
Set earliest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run earlier- Return type
DateTimeJobBase
- get_next_run()¶
Return the next execution timestamp.
- Return type
datetime
- 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.- Parameters
start (
Union
[int
,float
,None
]) – Interval start orNone
to disable jitterstop (
Union
[int
,float
,None
]) – Interval stop orNone
to build interval based on start
- Return type
DateTimeJobBase
- latest(time_obj)¶
Set latest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run later- Return type
DateTimeJobBase
- offset(timedelta_obj)¶
Set a constant offset to the calculation of the next run.
None
will disable the offset.- Parameters
timedelta_obj (
Optional
[timedelta
]) – constant offset- Return type
DateTimeJobBase
SunriseJob¶
- class eascheduler.jobs.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.- Parameters
func (
Optional
[Callable
[[datetime
],datetime
]]) – Function which returns a datetime obj, arg is a datetime with the next run time. ReturnSKIP_EXECUTION
together with a reoccurring job to skip the proposed run time.- Return type
DateTimeJobBase
- cancel()¶
Cancel the job.
- earliest(time_obj)¶
Set earliest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run earlier- Return type
DateTimeJobBase
- get_next_run()¶
Return the next execution timestamp.
- Return type
datetime
- 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.- Parameters
start (
Union
[int
,float
,None
]) – Interval start orNone
to disable jitterstop (
Union
[int
,float
,None
]) – Interval stop orNone
to build interval based on start
- Return type
DateTimeJobBase
- latest(time_obj)¶
Set latest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run later- Return type
DateTimeJobBase
- offset(timedelta_obj)¶
Set a constant offset to the calculation of the next run.
None
will disable the offset.- Parameters
timedelta_obj (
Optional
[timedelta
]) – constant offset- Return type
DateTimeJobBase
SunsetJob¶
- class eascheduler.jobs.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.- Parameters
func (
Optional
[Callable
[[datetime
],datetime
]]) – Function which returns a datetime obj, arg is a datetime with the next run time. ReturnSKIP_EXECUTION
together with a reoccurring job to skip the proposed run time.- Return type
DateTimeJobBase
- cancel()¶
Cancel the job.
- earliest(time_obj)¶
Set earliest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run earlier- Return type
DateTimeJobBase
- get_next_run()¶
Return the next execution timestamp.
- Return type
datetime
- 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.- Parameters
start (
Union
[int
,float
,None
]) – Interval start orNone
to disable jitterstop (
Union
[int
,float
,None
]) – Interval stop orNone
to build interval based on start
- Return type
DateTimeJobBase
- latest(time_obj)¶
Set latest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run later- Return type
DateTimeJobBase
- offset(timedelta_obj)¶
Set a constant offset to the calculation of the next run.
None
will disable the offset.- Parameters
timedelta_obj (
Optional
[timedelta
]) – constant offset- Return type
DateTimeJobBase
DuskJob¶
- class eascheduler.jobs.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.- Parameters
func (
Optional
[Callable
[[datetime
],datetime
]]) – Function which returns a datetime obj, arg is a datetime with the next run time. ReturnSKIP_EXECUTION
together with a reoccurring job to skip the proposed run time.- Return type
DateTimeJobBase
- cancel()¶
Cancel the job.
- earliest(time_obj)¶
Set earliest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run earlier- Return type
DateTimeJobBase
- get_next_run()¶
Return the next execution timestamp.
- Return type
datetime
- 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.- Parameters
start (
Union
[int
,float
,None
]) – Interval start orNone
to disable jitterstop (
Union
[int
,float
,None
]) – Interval stop orNone
to build interval based on start
- Return type
DateTimeJobBase
- latest(time_obj)¶
Set latest boundary as time of day.
None
will disable boundary.- Parameters
time_obj (
Optional
[time
]) – time obj, scheduler will not run later- Return type
DateTimeJobBase
- offset(timedelta_obj)¶
Set a constant offset to the calculation of the next run.
None
will disable the offset.- Parameters
timedelta_obj (
Optional
[timedelta
]) – constant offset- Return type
DateTimeJobBase