Skip to main content

Cron API

自用 fastapi 项目,提供对应接口,通过命令行启动

  • etcd 配置定时任务
  • mongodb 查看任务执行日志

安装

pipx install cron-api 或 uv tool install cron-api

运行

cron-api --help

# CRON_API_MONGO_DB_NAME="cron"
# 指定环境变量文件,环境变量文件需提供以上参数
cron-api --dotenv-path .env
# 还可以通过 --host, --port 指定fastapi启动地址和端口
uv run cron-api --host 0.0.0.0 --port 8000 --ssl-keyfile d:/.ssh/mkcert/key.pem --ssl-certfile d:/.ssh/mkcert/cert.pem

Metadata

Release files for cronapi-py 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cronapi-py 0.1.2
File Size Uploaded
cronapi_py-0.1.2.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cronapi-py 0.1.2
File Interpreter ABI Platform
cronapi_py-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / cronapi_py-0.1.2.tar.gz

Download URL cronapi_py-0.1.2.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5f8847464dfc1bcd5853d9ba8d1e4a6791a4cb6b6088737ee604f60e0d9c9284
BLAKE2b-256 checksum
How to use checksums
7927d6fece25c90fe1153c51b8f85939a584a6551c1583eb4847f417e8f16afc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / cronapi_py-0.1.2-py3-none-any.whl

Download URL cronapi_py-0.1.2-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3459973064933189cfc7ac5641926887c0929cd3ed8ac2fdd1a40dda0b3d0ed
BLAKE2b-256 checksum
How to use checksums
abbfdb4cf97e7fbcaeb8cc36166cef8f9e1a198005e66a0b6ea82a57e7c49836
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page