GithubHelp home page GithubHelp logo

gocron's Introduction

gocron - 定时任务管理系统

Build Status Downloads license Release

项目简介

使用Go语言开发的定时任务集中调度和管理系统, 用于替代Linux-crontab 查看文档

原有的延时任务拆分为独立项目延迟队列

功能特性

  • Web界面管理定时任务
  • crontab时间表达式, 精确到秒
  • 任务执行失败可重试
  • 任务执行超时, 强制结束
  • 任务依赖配置, A任务完成后再执行B任务
  • 账户权限控制
  • 任务类型
    • shell任务

    在任务节点上执行shell命令, 支持任务同时在多个节点上运行

    • HTTP任务

    访问指定的URL地址, 由调度器直接执行, 不依赖任务节点

  • 查看任务执行结果日志
  • 任务执行结果通知, 支持邮件、Slack

截图

流程图 任务 Slack

支持平台

Windows、Linux、Mac OS

环境要求

MySQL

下载

releases

版本升级

安装

二进制安装

  1. 解压压缩包  
  2. cd 解压目录
  3. 启动
  • 调度器启动
    • Windows: gocron.exe web
    • Linux、Mac OS: ./gocron web
  • 任务节点启动, 默认监听0.0.0.0:5921
    • Windows: gocron-node.exe
    • Linux、Mac OS: ./gocron-node
  1. 浏览器访问 http://localhost:5920

源码安装

  1. go语言版本1.7+
  2. go get -d github.com/ouqiang/gocron
  3. 编译
    • 调度器 go build -tags gocron -o gocron
    • 任务节点 go build -tags node -o gocron-node
  4. 启动、访问方式同上

命令

  • gocron

    • -v 查看版本
  • gocron web

    • --host 默认0.0.0.0
    • -p 端口, 指定端口, 默认5920
    • -e 指定运行环境, dev|test|prod, dev模式下可查看更多日志信息, 默认prod
    • -h 查看帮助
  • gocron-node

    • -allow-root *nix平台允许以root用户运行
    • -s ip:port 监听地址
    • -enable-tls 开启TLS
    • -ca-file   CA证书文件  
    • -cert-file 证书文件
    • -key-file 私钥文件
    • -h 查看帮助
    • -v 查看版本

To Do List

  • 版本升级
  • 批量开启、关闭、删除任务
  • 调度器与任务节点通信支持https
  • 任务分组
  • 多用户
  • 权限控制

程序使用的组件

反馈

提交issue

ChangeLog

v1.3

  • 支持多用户登录
  • 增加用户权限控制

v1.2.2

  • 用户登录页增加图形验证码
  • 支持从旧版本升级
  • 任务批量开启、关闭、删除
  • 调度器与任务节点支持HTTPS双向认证
  • 修复任务列表页总记录数显示错误

v1.1

  • 任务可同时在多个节点上运行
  • *nix平台默认禁止以root用户运行任务节点
  • 子任务命令中增加预定义占位符, 子任务可根据主任务运行结果执行相应操作
  • 删除守护进程模块
  • Web访问日志输出到终端

gocron's People

Contributors

ouqiang avatar

Watchers

James Cloos avatar  avatar

Forkers

mcfee-618

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.