GithubHelp home page GithubHelp logo

apscheduler-webui's Introduction

apscheduler-webui

License Python Version FastUI Version Apscheduler

中文 | English

apscheduler-webui 是一个基于 APSchedulerFastUI 构建的轻量级任务调度Web服务,旨在提供简洁直观的界面以管理和监控定时任务,同时利用 APScheduler 的强大功能实现灵活、高效的后台任务执行。

screenshot

目录

主要特性

  • 创建、编辑、暂停、启动、删除、重载任务
  • 支持Cron、Interval、Date触发器
  • 创建、删除Executor和JobStore
  • 任务执行日志
  • 查看脚本文件内容

快速开始

  1. 克隆本仓库

    git clone https://github.com/Dragon-GCS/apscheduler-webui
  2. 安装依赖

    推荐使用start

    start init  # 创建虚拟环境(可选)
    start install

    或者使用pip

    python -m venv .venv # 创建虚拟环境(可选)
    pip install .
  3. 启动服务

    uvicron main:app

任务管理

  • 在你的脚本中使用apscheduler注册任务
from src.scheduler import scheduler

scheduler.add_job(func, ...)
# or use decorator
@scheduler.scheduled_job(...)
def your_func(...):
    ...
  • 使用webui(/new),通过字符串注册任务:your_module:your_func

    为了管理脚本,建议将脚本放在指定目录下(比如scripts)下并通过scripts.your_module:your_func注册任务

Executor、JobStore管理

  • src/config.py中配置
  • 通过webui(/store, /executor)管理(每次启动服务都会重置)

日志查看

  • webui(/log/jobs)可以查看日志目录(默认为logs,可以在config.py中配置)中所有jobs开头的日志
  • 你可以直接使用loguru.logger来记录日志,但是日志格式需要使用src.log.LOG_FORMAT
  • 使用src.log:server_log,无需配置即可正确解析。

许可证

本项目采用 MIT 许可证。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.