Task Scheduling
一个强大的 Python 任务调度库,提供灵活的任务管理和调度功能。
支持系统:可以安装python的所有系统
特性
- 🚀 简单易用的任务创建和管理
- ⏰ 灵活的定时调度策略,目前的版本会造成微小的运行时间增加
- 🔄 支持任务重试和依赖管理
- 🌐 内置 Web 控制界面
- 🧵 支持线程级任务执行
- 🌳 任务树模式支持
- 🔗 分布式服务支持
- 📊 实时状态监控和结果查询
文档
完整使用说明和完整功能介绍请查看: https://fallingmeteorite.github.io/task_scheduling/
快速开始
安装
pip install --upgrade task_scheduling
基本使用
import time
from task_scheduling.variable import *
from task_scheduling.utils import interruptible_sleep
def linear_task(input_info):
for i in range(10):
interruptible_sleep(1)
print(f"Linear task: {input_info} - {i}")
if __name__ == "__main__":
from task_scheduling.task_creation import task_creation
from task_scheduling.manager import task_scheduler
task_id1 = task_creation(
None, None, FUNCTION_TYPE_IO, True, "linear_task",
linear_task, priority_low, "Hello Linear"
)
while True:
try:
time.sleep(0.1)
except KeyboardInterrupt:
task_scheduler.shutdown_scheduler()
感谢
https://github.com/glenfant/stopit
感谢这个库给予我了一个很巧妙地思维去处理任务控制相关的逻辑
为了便于后续修改我将它放在库内部,而不是通过 pip 安装的,所以这里明确说明并感谢
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!
Metadata
Release files for task-scheduling 6.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| task_scheduling-6.6.0.tar.gz | 74.6 kB | Without provenance | Details for task_scheduling-6.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| task_scheduling-6.6.0-py3-none-any.whl | Python 3 | none | any | Details for task_scheduling-6.6.0-py3-none-any.whl |
Total release size: 188.7 kB
Release files / task_scheduling-6.6.0.tar.gz
| Download URL | task_scheduling-6.6.0.tar.gz |
|---|---|
| Size | 74.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1ca4629e2c628601c31330b49024506edc7621c056b1de3143cca35f08131a1
|
|
BLAKE2b-256 checksum How to use checksums |
7f1d11efb07dbc3aae5a66be4e1ff6bc7c008af7a7dd5d9ec59dba8a76942ca0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / task_scheduling-6.6.0-py3-none-any.whl
| Download URL | task_scheduling-6.6.0-py3-none-any.whl |
|---|---|
| Size | 114.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1239c939d9dd0877e3a97bf8122fd6d612a1a2d9bc7773fc6799372e73e5e2c7
|
|
BLAKE2b-256 checksum How to use checksums |
92b4ecb4825b82f20d1eaba0e47905e2303e8c1c769c313fcd8c2136e59e2756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for task-scheduling 6.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.