Python background jobs with a decorator — no Redis, no Celery
Project description
crontask
Python background jobs with a decorator — no Redis, no Celery.
pip install pycrontask
from contextlib import asynccontextmanager
from fastapi import FastAPI
import crontask
ct = crontask.init(
api_key="...",
database_url="postgresql://...",
base_url="https://api.crontask.dev",
)
@ct.job(schedule="0 9 * * *")
async def send_daily_report():
await do_the_work()
@asynccontextmanager
async def lifespan(app: FastAPI):
await ct.start()
yield
app = FastAPI(lifespan=lifespan)
Works with async def and regular def functions. Failure alerts by email. Dashboard at crontask.dev.
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
pycrontask-0.1.1.tar.gz
(5.7 kB
view details)
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 pycrontask-0.1.1.tar.gz.
File metadata
- Download URL: pycrontask-0.1.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3af1d8d5d86d5b5313543adc6b53ba78d390e48c665c3d84b86b2f720a3ff040
|
|
| MD5 |
9af048ba6b8a0345848d8bd3ccf2a46c
|
|
| BLAKE2b-256 |
0b226f0bc4df5cab570591d4ea1f630ef3b9c33bec859174640c32ac224a8531
|
File details
Details for the file pycrontask-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pycrontask-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f5e13798fa9f762dde32dec632448bffccf75368ee076a34bf341c219791be3
|
|
| MD5 |
6acd54fd987c967ecb14c01a9a06e2e9
|
|
| BLAKE2b-256 |
6d9394c44b5f01d0dc2fdbb4d4842c86a3b1fcd8f2258d2aebcfe41e3fec37c7
|