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.3.tar.gz (7.8 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.3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cron_api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 44bf7373684f24730d6804ab37669d7d001b3a240a41de7a3df56dd1328720b9
MD5 3c253a75210848960b32bca9741f6925
BLAKE2b-256 7d075755d507344ac74a8ab35a39a382a0f7f52f9dc39781f8ebe1375c7b8c86

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cron_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 778e2cb7a0464eb1bde9982dba9b52e6e4c592167b27ad95f639d68883e09a50
MD5 1390f7f2224b63da6a3d653671fd6ed0
BLAKE2b-256 83d18c0ef069920fce904a3739abcbbe8ded8ce8e2b66a64b593b38f547537d5

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