GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NTHunt/cronJob: 本项目采用FastAPI + APScheduler + ZeroRPC开发轻量级定时调度平台

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
job
job
 
 
rpc
rpc
 
 
scheduler
scheduler
 
 
tests
tests
 
 
utils
utils
 
 
.env
.env
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
Pipfile
Pipfile
 
 
Pipfile.lock
Pipfile.lock
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
rpc_server.py
rpc_server.py
 
 
run.py
run.py
 
 
run.sh
run.sh
 
 
setup.cfg
setup.cfg
 
 
sources.list
sources.list
 
 

Repository files navigation

CronJob

本项目采用FastAPI + APScheduler + ZeroRPC开发轻量级定时调度平台

特点

  • 完全兼容Crontab
  • 支持秒级定时任务
  • 作业任务可搜索、暂停、编辑、删除
  • 作业任务持久化存储、三种不同触发器类型作业动态添加
  • 采用RPC方式规避了APScheduler在多进程部署的情况下,任务被多次调度的问题
  • 提供图形化的管理页面

TODO

  • WEB UI页面优化cronJobFront

使用

  • 安装虚拟环境管理器
pip install pipenv
  • 获取代码并激活虚拟环境
git clone https://github.com/AnsGoo/cronJob.git
pipenv shell
  • 安装依赖
pipenv sync
  • 运行
// 开发
pipenv run dev --host=0.0.0.0 --port=8000 --reload
pipenv run rpc

// 生产

pipenv run server--workers=4 --host=0.0.0.0 --port=8000
pipenv run rpc
  • 部署

制作镜像

docker build cronjob:v1 .

运行

docker run -p 8000:8000 -p 4242:4242 --name cronjob -it cronjob:v1
  • 开发任务

在job/tasks.py的Task对象中自定义以task开头的任务即可在调度方法中调取该任务,例如:

class Task(BaseTask):
    def task_test(self) -> None:
        '''
        测试任务
        :return:
        '''
        print('test')

License

This project is licensed under the terms of the MIT license.

About

本项目采用FastAPI + APScheduler + ZeroRPC开发轻量级定时调度平台

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.