Scheduled method execution for the Pico ecosystem: @scheduled(every=...) and @scheduled(cron=...) on components.
Project description
pico-scheduling
Scheduled method execution for the pico ecosystem: @scheduled on component methods, powered by APScheduler.
Installation
pip install pico-scheduling
Auto-discovered by pico-boot; with plain pico-ioc add "pico_scheduling" to init(modules=[...]).
Quick start
from pico_ioc import component
from pico_scheduling import scheduled
@component
class Reports:
@scheduled(every=300) # every 5 minutes
def refresh_cache(self): ...
@scheduled(cron="0 3 * * *") # 03:00 daily
async def nightly_rollup(self): ...
Jobs start when the container starts and stop on container.shutdown(). Each run resolves the component through the container (prototype scope gives a fresh instance per run). A failing job is logged and does not stop the schedule. Sync and async methods both work.
Disable everything with config:
scheduling:
enabled: false
Documentation
Full documentation: https://dperezcabrera.github.io/pico-scheduling/
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pico_scheduling-0.1.0.tar.gz.
File metadata
- Download URL: pico_scheduling-0.1.0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22ab877ab93c4476e9f52f8c00c1af56f883e9d35a1ae0321588c22a0338a3d0
|
|
| MD5 |
d0e8e8f4de2865bc6ae8083486479c8a
|
|
| BLAKE2b-256 |
14c800e1d86987d92ca65792eccb0f06aa9f4f555ac1b5bc09839fab4c0e58f3
|
Provenance
The following attestation bundles were made for pico_scheduling-0.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on dperezcabrera/pico-scheduling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pico_scheduling-0.1.0.tar.gz -
Subject digest:
22ab877ab93c4476e9f52f8c00c1af56f883e9d35a1ae0321588c22a0338a3d0 - Sigstore transparency entry: 2137503580
- Sigstore integration time:
-
Permalink:
dperezcabrera/pico-scheduling@a215a1b134cb4a5bb06e7f86978a5d9e949af218 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dperezcabrera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a215a1b134cb4a5bb06e7f86978a5d9e949af218 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pico_scheduling-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pico_scheduling-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6c6bf1e3d4be3229faaa45dfc61c3741c9b177c1241836a9dec1c7dc3eed4c4
|
|
| MD5 |
fc5aa02d95da29a182f81c75b0fa42e4
|
|
| BLAKE2b-256 |
7a34d8abcdc13b5742462aed5c8c8b5358c1df2218fa74d82675c40755b504e9
|
Provenance
The following attestation bundles were made for pico_scheduling-0.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on dperezcabrera/pico-scheduling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pico_scheduling-0.1.0-py3-none-any.whl -
Subject digest:
f6c6bf1e3d4be3229faaa45dfc61c3741c9b177c1241836a9dec1c7dc3eed4c4 - Sigstore transparency entry: 2137503798
- Sigstore integration time:
-
Permalink:
dperezcabrera/pico-scheduling@a215a1b134cb4a5bb06e7f86978a5d9e949af218 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/dperezcabrera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a215a1b134cb4a5bb06e7f86978a5d9e949af218 -
Trigger Event:
release
-
Statement type: