Git Product home page Git Product logo

gocron's Introduction

Build Status

gocron - 定时任务管理系统

项目简介

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

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

功能特性

  • Web界面管理定时任务, 支持动态添加、删除任务
  • crontab时间表达式,精确到秒
  • 任务执行失败重试设置
  • 任务超时设置
  • 任务依赖配置
  • 任务类型
    • shell任务

    在任务节点上执行shell命令

    • HTTP任务

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

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

截图

流程图 任务 Slack

支持平台

Windows、Linux、Mac OS

环境要求

MySQL

下载

v1.0

安装

二进制安装

  1. 解压压缩包  
  2. cd 解压目录
  3. 启动
  • 调度器启动
    • Windows: gocron.exe web
    • Linux、Mac OS: ./gocron web
  • 任务节点启动
    • Windows: gocron-node.exe ip:port (默认0.0.0.0:5921)
    • Linux、Mac OS: ./gocron-node ip:port (默认0.0.0.0:5921)
  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 web
    • --host 默认0.0.0.0
    • -p 端口, 指定端口, 默认5920
    • -e 指定运行环境, dev|test|prod, dev模式下可查看更多日志信息, 默认prod
    • -d 后台运行
    • -h 查看帮助
  • gocron-node ip:port, 默认0.0.0.0:5921

程序使用的组件

反馈

提交issue

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.