Skip to main content

PulseTask

轻量级、跨平台(Linux / Windows)的任务调度系统:Web 界面 + REST API + CLI 三种使用方式。

通过 Web 界面配置脚本任务的运行规则,支持按时间间隔、Crontab 触发或手动执行,提供任务管理、运行历史、日志查看等能力。

技术栈

层级 选型
前端 原生 HTML + Tailwind CSS + JS(无构建依赖,随包分发)
后端 Python 3.10+ / FastAPI
调度 APScheduler(interval / cron / manual)
存储 SQLite(WAL 模式,零配置)

功能特性

  • 触发方式:固定间隔 / Crontab 表达式(UTC)/ 手动执行
  • 执行控制:超时强制终止整个进程树、失败自动重试、按任务并发锁(同一任务不重复执行,不同任务并行运行)
  • Web 界面:仪表盘统计、任务列表(搜索/筛选)、弹窗式新建/编辑任务、运行历史分页、终端风格日志查看(自动滚动到底部)
  • REST API:完整任务生命周期管理,内置 Swagger 文档(/docs)
  • CLI 启动:支持 --host / --port / --db / --reload 等参数
  • 单 wheel 分发:pip install 后前端随包携带,开箱即用

快速开始

# 安装(任选其一;Python 包导入名为 pulsetask)
pip install pulse-task                      # pip
uv tool install pulse-task                  # uv,作为全局命令安装

# 从源码安装(开发模式)
uv venv .venv && uv pip install -e ".[dev]"

# 启动服务(默认 http://127.0.0.1:8000)
pulse-task

浏览器打开 http://127.0.0.1:8000 即可使用;API 文档在 http://127.0.0.1:8000/docs。

免安装直接运行:uvx pulse-task。

CLI 参数

pulse-task [--host HOST] [--port PORT] [--db PATH] [--ui DIR] [--reload] [--log-level LEVEL] [--version]
参数 默认值 说明
--host 127.0.0.1 监听地址(环境变量 HOST 可改默认值)
--port 8000 监听端口(环境变量 PORT 可改默认值)
--db <项目根>/pulsetask.db SQLite 数据库路径(等价于 PULSETASK_DB)
--ui 包内 ui/ 目录 前端静态页面目录(等价于 PULSETASK_UI)
--reload 关闭 开发模式:代码变更自动重启
--log-level info critical / error / warning / info / debug / trace
--version — 查看版本

等价入口:python -m pulsetask。也可 uvicorn pulsetask.app:app 直接启动(此时 --db / --ui 需用环境变量)。

API 概览

方法 路径 说明
GET /api/health 健康检查
GET /api/dashboard 仪表盘统计
GET /api/tasks 任务列表(search / enabled / trigger_type 过滤)
POST /api/tasks 创建任务
GET / PATCH / DELETE /api/tasks/{id} 任务详情 / 部分更新 / 删除
POST /api/tasks/{id}/enable /disable /run 启用 / 禁用 / 立即执行
GET /api/tasks/{id}/history?limit=&offset= 运行历史(分页)
GET /api/tasks/{id}/logs?run_id= 运行日志
GET /api/runs?limit=&offset= 全局运行记录(分页)

项目结构

PulseTask/
├── README.md                # 本文档
├── DESIGN.md                # 设计文档(架构 / 数据库 / API / 页面)
├── pyproject.toml
├── docs/ui-design/          # UI 设计阶段产物存档(不参与运行)
├── src/pulsetask/
│   ├── app.py               # FastAPI 应用组装
│   ├── cli.py               # 命令行入口
│   ├── api.py               # /api 路由
│   ├── config.py            # 配置解析
│   ├── schemas.py           # 请求模型
│   ├── database.py          # SQLite 数据访问层
│   ├── scheduler.py         # 调度与命令执行
│   └── ui/pages/            # 前端静态页面 + 共享弹窗组件
└── pulsetask.db             # SQLite 数据库(首次运行自动创建)

开发

.venv/Scripts/ruff.exe check src        # 代码检查
.venv/Scripts/python.exe -m mypy        # 类型检查(strict)
uv build                                # 构建 wheel / sdist 到 dist/

Metadata

Release files for pulse-task 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulse-task 0.1.0
File Size Uploaded Provenance Actions
pulse_task-0.1.0.tar.gz 32.4 kB Without provenance Details for pulse_task-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pulse-task 0.1.0
File Interpreter ABI Platform Actions
pulse_task-0.1.0-py3-none-any.whl Python 3 none any Details for pulse_task-0.1.0-py3-none-any.whl

Total release size: 67.8 kB

Release files / pulse_task-0.1.0.tar.gz

Download URL pulse_task-0.1.0.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
33d8ffe5a7932a93f0799ed54b7307d7461226b52ba9b9df3989c45b1a4844d7
BLAKE2b-256 checksum
How to use checksums
e8e38befb4c9f77ea6c20612b1c38bcaf87da839656b31a0f075b454db27a5e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pulse_task-0.1.0-py3-none-any.whl

Download URL pulse_task-0.1.0-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5a6fad73b731eeb75873b6f02ddc6fb6f38c489a1836ad52ebae56cf09b95a1
BLAKE2b-256 checksum
How to use checksums
053685c7c9e9647a10b8573ae8de8b41e901b928edfd283e771ef58e8f630fbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pulse-task 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page