定时任务api
Project description
Cron API
自用 fastapi 项目,提供对应接口,通过命令行启动
- etcd 配置定时任务
- mongodb 查看任务执行日志
安装
pipx install cron-api 或 uv 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.0.tar.gz
(7.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
cron_api-0.1.0-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file cron_api-0.1.0.tar.gz.
File metadata
- Download URL: cron_api-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.27
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da44cf9c08c8185ebb5621f6ef692b13c701645d38bb6066e37718022f4db24b
|
|
| MD5 |
0954b9b5f27e0e1a463916f9f3a5c287
|
|
| BLAKE2b-256 |
40aeddfd8a716ef7cefd4954adbad41e646a94f16b561c15ed88252152362af7
|
File details
Details for the file cron_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cron_api-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6a4dce6d34e175432149af9088804dedc1eb87c35a87c71236a76df1e73c35f
|
|
| MD5 |
9a539488dfa312f80ec5eb5e8f936c1b
|
|
| BLAKE2b-256 |
d705735cf0698c88b6bf178039a8de7f22b4c0d7f15d58015a7545aaaaa21d96
|