EAScheduler
Easy async task scheduling
Easy Async Scheduler (or EAScheduler) is a lightweight asyncio scheduler with a nice and easy to use interface.
The home automation software HABApp make use of EAScheduler.
Documentation
The documentation can be found here
Example
import eascheduler
async def my_coro() -> None:
print('Hello')
# If you want something easy that you can use out of the box just use the default scheduler
scheduler = eascheduler.get_default_scheduler()
# -------------------------------------------------------------------------------------------------------
# Different job types
# -------------------------------------------------------------------------------------------------------
# Run once in 30s
job_once = scheduler.once(30, my_coro)
# Countdown
countdown = scheduler.countdown(30, my_coro)
countdown.reset() # make countdown start (again)
countdown.stop() # stop countdown
countdown.set_countdown(15) # set different countdown time which will be used for the next reset call
# Trigger job which runs continuously, e.g.
# every day at 8
job_every = scheduler.at(scheduler.triggers.time('08:00:00'), my_coro)
# for the first time in 10 mins, then every hour
job_every = scheduler.at(scheduler.triggers.interval(600, 3600), my_coro)
# -------------------------------------------------------------------------------------------------------
# Restricting the trigger with a filter.
# Only when the filter condition passes the time will be taken as the next time
# every Fr-So at 8
scheduler.at(
scheduler.triggers.time('08:00:00').only_at(scheduler.filters.weekdays('Fr-So')),
my_coro
)
# Triggers can be grouped
# Mo-Fr at 7, Sa at 8
scheduler.at(
scheduler.triggers.group(
scheduler.triggers.time('07:00:00').only_at(scheduler.filters.weekdays('Mo-Fr')),
scheduler.triggers.time('08:00:00').only_at(scheduler.filters.weekdays('Fr-So')),
),
my_coro
)
# Filters can be grouped with any or all
# On the first sunday of the month at 8
scheduler.at(
scheduler.triggers.time('08:00:00').only_at(
scheduler.filters.all(
scheduler.filters.days('1-7'),
scheduler.filters.weekdays('So'),
),
),
my_coro
)
# -------------------------------------------------------------------------------------------------------
# The trigger time can also be modified
# On sunrise, but not earlier than 8
scheduler.at(
scheduler.triggers.sunset().earliest('08:00:00'),
my_coro
)
# One hour before sunset
scheduler.at(
scheduler.triggers.sunset().offset(timedelta(hours=-1)),
my_coro
)
Changelog
0.2.11 (2026-10-23)
- Updated dependencies
0.2.10 (2026-10-23)
- Updated dependencies
0.2.9 (2026-08-10)
- License Change to EUPL-1.2
- Migrated to pyproject.toml
- Fixed a bug with sun azimuth
- Small code improvements
- Updated dependencies
0.2.8 (2025-08-19)
- Updated whenever to 0.9 which introduces breaking changes:
- Removed SystemDateTime and replaced it with ZonedDateTime
- Updated dependencies and CI
0.2.7 (2025-08-19)
- Updated dependencies
0.2.6 (2025-06-12)
- Small fixes
- Updated dependencies
0.2.5 (2025-05-06)
- Updated to whenever 0.8 which introduces breaking changes
- Updated dependencies
0.2.4 (2025-05-06)
- Updated to whenever 0.8 which introduces breaking changes
- Updated dependencies
0.2.3 (2025-03-26)
- Updated dependencies
0.2.2 (2025-01-07)
- Ensured that all trigger builders are imputable and can be composed without side effects
- Updated dependencies
0.2.1 (2024-11-20)
- Updated dependencies and some type hints
0.2.0 (2024-11-13)
- Complete rewrite
0.1.11 (2023-09-11)
- Fixed an issue with a possible infinite loop
0.1.10 (2023-08-24)
- Added option to add a callback to the job when the execution time changes
0.1.9 (2023-07-19)
- Fix for days when the sun doesn't rise or set. In that case the next date with a sunrise/sunset will be returned.
0.1.8 (2022-12-14)
- Fix for OneTimeJob incorrectly showing a remaining time after the execution
- Dependency update
0.1.7 (2022-07-27)
- Added py.typed
0.1.6 (2022-07-27)
- Removed Python 3.7 support
- Fixed setup issues
0.1.5 (2022-02-14)
- Jobs have a remaining function
- CountdownJob has a stop function
0.1.4 (2021-06-01)
- Added option to pause and resume the scheduler
- Jobs don't have to be in the future any more
- Sorted imports with isort
0.1.3 (2021-05-06)
- Fixed a bug where a negative offset/jitter could result in multiple executions
0.1.2 (2021-05-06)
- Fixed a bug where
.every(None, ...)would result in an error
0.1.1 (2021-05-02)
- Implemented a much nicer API and fixed some bugs
0.1.0 (2021-04-21)
- Fixed a race condition
- Added tests
0.0.9 (2021-04-19)
- Fixes for wrong timezone
- Added tests
0.0.8 (2021-04-17)
- Fixes for SunJob, ReoccurringJob
- Added tests
0.0.7 (2021-04-15)
- Fixes for Sunrise/Sunset
Metadata
Release files for EAScheduler 0.2.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eascheduler-0.2.11.tar.gz | 34.4 kB | Without provenance | Details for eascheduler-0.2.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eascheduler-0.2.11-py3-none-any.whl | Python 3 | none | any | Details for eascheduler-0.2.11-py3-none-any.whl |
Total release size: 83.1 kB
Release files / eascheduler-0.2.11.tar.gz
| Download URL | eascheduler-0.2.11.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00e628c30a5f3d3819c692bdcab31e1070dac80e4868e03384ba9b846ef94367
|
|
BLAKE2b-256 checksum How to use checksums |
556659a1d118a723401310ae713a3e1530458094fe3c85006c9b94bb105cf58e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / eascheduler-0.2.11-py3-none-any.whl
| Download URL | eascheduler-0.2.11-py3-none-any.whl |
|---|---|
| Size | 48.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0986c32eb33fc1856c40bc1c466d1b75c993277c4a38a524706cd6b147f40316
|
|
BLAKE2b-256 checksum How to use checksums |
a018095a5576158b660c3a14ffacfe0841e8231b7788ea96d5a84fce2f1797f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for EAScheduler 0.2.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.