Tigrbl API Cron ⏰
A lightweight Tigrbl application that stores cron schedules, exposes CRUD APIs, and runs registered jobs while capturing their execution results.
✨ Features
- 🗄️ Persists cron jobs as first-class
CronJobrows with default CRUD verbs. - 🪪 Tracks validity windows, timestamps, and last execution metadata for each schedule.
- 📜 Records every execution in the
CronJobResulttable for full observability. - ⚙️ Provides a simple registry and executor to run due jobs and persist their outputs or failures.
- 🚀 Ships with a
ASGIapplication constructor for rapid deployment.
📦 Installation
Using uv
uv add tigrbl_api_cron
Using pip
pip install tigrbl_api_cron
🚀 Quick Start
import asyncio
from datetime import datetime, timezone
from tigrbl_api_cron import (
CronJob,
build_app,
execute_due_jobs,
register_cron_job,
)
# 1. Build and initialize the API (SQLite in-memory by default)
app = build_app()
asyncio.run(app.initialize())
# 2. Register a callable that will be invoked when its cron job is due
@register_cron_job("demo.pkg")
async def demo_job(*, job: CronJob, session, scheduled_for, now):
return {"ran_at": now.isoformat()}
# 3. Create a cron job entry (via ORM, REST, or RPC)
async def seed_job():
async with app.engine.asession() as session:
job = CronJob(pkg_uid="demo.pkg", cron_expression="*/5 * * * *")
session.add(job)
await session.commit()
asyncio.run(seed_job())
# 4. Run due jobs and capture their results
asyncio.run(execute_due_jobs(app, now=datetime.now(timezone.utc)))
🧪 Executing Jobs
- Register handlers with
register_cron_job(pkg_uid). - Call
execute_due_jobs(app, now=...)from a scheduler or worker process. - Results are written to the
CronJobResulttable and surfaced via the REST API.
📄 License
This project is licensed under the terms of the Apache 2.0 license.
Metadata
Release files for tigrbl_api_cron 0.1.2
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 |
|---|---|---|---|---|
| tigrbl_api_cron-0.1.2.tar.gz | 10.5 kB | Without provenance | Details for tigrbl_api_cron-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tigrbl_api_cron-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for tigrbl_api_cron-0.1.2-py3-none-any.whl |
Total release size: 23.7 kB
Release files / tigrbl_api_cron-0.1.2.tar.gz
| Download URL | tigrbl_api_cron-0.1.2.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45ed96a0cf2f44b40d0f0c66e9218b7a476203c346e73fa0e283edcf812a8d96
|
|
BLAKE2b-256 checksum How to use checksums |
b21f2d1998d6c38feb840e869179ce1b90a26f35fb7a9e0fcf55324f808d314e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tigrbl_api_cron-0.1.2-py3-none-any.whl
| Download URL | tigrbl_api_cron-0.1.2-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
296536557759ff2e547fdfb9acdea81a796445dc7e9bdf4c7fa3b7204cc77f6e
|
|
BLAKE2b-256 checksum How to use checksums |
4745d485770f52770ca2bf21739a6f00c39e66f1fea2e54ad9010a7512d9e035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for tigrbl_api_cron 0.1.2
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.