Skip to main content

定时任务api

Project description

Cron API

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

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

安装

pipx install cron-apiuv tool install cron-api

运行

cron-api --help

# CRON_API_ETCD_HOSTS="192.168.123.7:2379"
# CRON_API_MONGO_URL="mongodb://192.168.123.7:27017"
# CRON_API_MONGO_DB_NAME="cron"
# 指定环境变量文件,环境变量文件需提供以上参数
cron-api --dotenv-path .env
# 还可以通过 --host, --port 指定fastapi启动地址和端口
cron-api --host 0.0.0.0 --port 8000

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cron_api-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cron_api-0.1.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file cron_api-0.1.1.tar.gz.

File metadata

  • Download URL: cron_api-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.27

File hashes

Hashes for cron_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f9cfa705e6c2355321e2260e3f04705475ebf44c156133d01519580d26e65c4b
MD5 65d8511a7ef333eec66da6ef352d630c
BLAKE2b-256 8d00e84aed7140f0e8b7175cfcdece40529ceee2ce86bef00820a686222a4c8a

See more details on using hashes here.

File details

Details for the file cron_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cron_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.27

File hashes

Hashes for cron_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90c440c9df3224df8f8487a256d7ca7f4add2e17af4e9363cf3b49dabf544887
MD5 32624ab18a32a38ee15e8e642f580b22
BLAKE2b-256 7962e665ad0eab5918933f480eefa20dd85ca339d07c7ca1fdf6af885ef14f11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page