Git Product home page Git Product logo

cronsun's Introduction

cronsun

cronsun 是一个分布式任务系统,单个结点和 *nix 机器上的 crontab 近似。支持界面管理机器上的任务,支持任务失败邮件提醒,安装简单,使用方便,是替换 crontab 一个不错的选择。

cronsun 是为了解决多台 *nix 机器上crontab 任务管理不方便的问题,同时提供任务高可用的支持(当某个节点死机的时候可以自动调度到正常的节点执行)。cronsunAzkabanChronosAirflow 这些不是同一类型的。

架构

                                                [web]
                                                  |
                                     --------------------------
           (add/del/update/exec jobs)|                        |(query job exec result)
                                   [etcd]                 [mongodb]
                                     |                        ^
                            --------------------              |
                            |        |         |              |
                         [node.1]  [node.2]  [node.n]         |
             (job exec fail)|        |         |              |
          [send mail]<-----------------------------------------(job exec result)

安全性

cronsun是在管理后台添加任务的,所以一旦管理后台泄露出去了,则存在一定的危险性,所以cronsun支持security.json的安全设置:

{
    "open": true,
    "#users": "允许选择运行脚本的用户",
    "users": [
        "www", "db"
    ],
    "#ext": "允许添加以下扩展名结束的脚本",
    "ext": [
        ".cron.sh", ".cron.py"
    ]
}

如上设置开启安全限制,则添加和执行任务的时候只允许选择配置里面指定的用户来执行脚本,并且脚本的扩展名要在配置的脚本扩展名限制列表里面。

Getting started

Setup / installation

Building with the source

go get -u github.com/shunfei/cronsun
cd $GOPATH/src/github.com/shunfei/cronsun
sh ./build.sh

Or install with the binary releases

执行文件和配置文件在 dist 文件夹

Run

  1. 安装 MongoDB
  2. 安装 etcd3
  3. 修改 conf 相关的配置
  4. 在任务结点启动 ./cronnode -conf conf/base.json,在管理结点启动 ./cronweb -conf conf/base.json
  5. 访问管理界面 http://127.0.0.1:7079/ui/

Screenshot

Brief:

Exec result:

Job:

Node:

Credits

cron is base on robfig/cron

cronsun's People

Contributors

miraclesu avatar qleelulu avatar

Watchers

James Cloos avatar  avatar

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.