Skip to main content

It is mainly used for task scheduling

Project description

Task Scheduling

一个强大的 Python 任务调度库,提供灵活的任务管理和调度功能。

特性

  • 🚀 简单易用的任务创建和管理
  • ⏰ 灵活的定时调度策略
  • 🔄 支持任务重试和依赖管理
  • 🌐 内置 Web 控制界面
  • 🧵 支持线程级任务执行
  • 🌳 任务树模式支持
  • 🔗 分布式服务支持
  • 📊 实时状态监控和结果查询

快速开始

安装

pip install 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://fallingmeteorite.github.io/task_scheduling/

基础功能

  • 任务创建和管理
  • 任务状态控制
  • 结果获取
  • Web 控制界面
  • 配置文件支持

高级功能

  • 线程级任务
  • 任务树模式
  • 依赖型任务
  • 任务重试机制
  • 分布式服务

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

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

task_scheduling-6.0.1.tar.gz (64.7 kB view details)

Uploaded Source

Built Distribution

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

task_scheduling-6.0.1-py3-none-any.whl (101.3 kB view details)

Uploaded Python 3

File details

Details for the file task_scheduling-6.0.1.tar.gz.

File metadata

  • Download URL: task_scheduling-6.0.1.tar.gz
  • Upload date:
  • Size: 64.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for task_scheduling-6.0.1.tar.gz
Algorithm Hash digest
SHA256 621c5fe50ac3ea6ac4f820f13ba06a03f28e14b83d49e111a2e6ade88174220a
MD5 d7100c6fdd8639d0dfa62d2e3b8d287f
BLAKE2b-256 0f11ce89ca3ae0e49a41856f088a74aaf8b42c6aaf27a44c399255c656989b6a

See more details on using hashes here.

File details

Details for the file task_scheduling-6.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for task_scheduling-6.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0f1e0e4326baff25bb9aa8599386f753dae780ecc2b0f62281fb7a5d2907d5c
MD5 845c4aeab12dd1f0f7291b40b22043f6
BLAKE2b-256 dafc18bb286c54a4fb0b7d35d873f957b42b76f281c1cf149bc8a63ea4032fbd

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