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.1

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.1
File Size Uploaded
cronapi_py-0.1.1.tar.gz 8.2 kB Details

Built distribution (wheel)

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

Total release size: 18.9 kB

Release files / cronapi_py-0.1.1.tar.gz

Download URL cronapi_py-0.1.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d0a76d792b32b205a61434fab91973dd11731519b3b4fe0b0ba225b6884e50c0
BLAKE2b-256 checksum
How to use checksums
9dcc7714fa0e87b3ad13461adc68f88cf8469f122b4b537421be0f8268ec24dd
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.1-py3-none-any.whl

Download URL cronapi_py-0.1.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6358d56e0e80854f2117cb8e6902f63c9aac0cfc2edbcfd2124a4f61de537371
BLAKE2b-256 checksum
How to use checksums
b6d4ea13cd5ec441e07a099fd0b4d7e95a737a23befc204eaaae133e4b18948a
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

0.1.2

2 release files

This release

0.1.1 This release

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