Go to file
Doflatango 0d7c2f28b1 fixed NextID() generate duplicate id when restarts the web process multiple times 2019-04-11 20:54:38 +08:00
.github Update issue template 2017-05-24 18:19:28 +08:00
bin some optimize: 2018-09-07 11:30:01 +08:00
conf fixed conf sample format error 2018-11-20 21:22:58 +08:00
db mongo auth with authSource 2018-11-20 11:41:40 +08:00
doc/img Update screenshot(en) of dashboard page 2018-03-08 15:12:26 +08:00
event bugfix: emit nil event 2018-02-24 15:49:58 +08:00
log Added login and accounts manager modules 2017-06-29 15:15:33 +08:00
node Fix add node to group 2018-11-30 16:10:13 +08:00
utils remove useless code 2017-10-17 18:19:00 +08:00
web Merge pull request #123 from lbbniu/master_ui_optimize 2018-11-29 16:44:13 +08:00
.editorconfig 检查用作key的id和名称,添加获取活动节点的接口 2017-05-09 17:52:45 +08:00
.gitignore cmd: Add rmold command for node 2018-05-26 20:58:29 +08:00
.travis.yml ci for go module 2018-09-06 15:07:12 +08:00
LICENSE Update LICENSE 2017-10-25 21:19:52 -05:00
README.md Change config: open auth by default 2018-09-21 09:39:40 +08:00
README_ZH.md Update README_ZH.md 2018-09-26 16:52:24 +08:00
account.go Added new readonly role: Reporter 2018-05-05 10:17:05 +08:00
build.sh Update build.sh to build new tool: csctl 2018-03-08 15:16:12 +08:00
client.go Baned backslash in group name 2018-07-18 14:57:28 +08:00
common.go csctl: for cmd tools, watch configuration files is unnecessary. 2018-02-23 17:07:57 +08:00
csctl.go csctl: add sync command for node to sync node info to mongodb 2018-05-26 21:31:33 +08:00
errors.go Baned backslash in group name 2018-07-18 14:57:28 +08:00
go.mod run go mod tidy 2018-09-15 18:04:50 +08:00
go.sum run go mod tidy 2018-09-15 18:04:50 +08:00
group.go remove github.com/coreos/etcd/mvcc/mvccpb 2018-02-24 14:31:22 +08:00
id.go fixed NextID() generate duplicate id when restarts the web process multiple times 2019-04-11 20:54:38 +08:00
job.go fix incorrect retry times 2019-01-22 15:35:08 +08:00
job_log.go UI: 2018-03-19 15:36:10 +08:00
mdb.go pkg: mv models to cronsun 2017-05-12 14:48:24 +08:00
node.go csctl: add sync command for node to sync node info to mongodb 2018-05-26 21:31:33 +08:00
noticer.go more clearly email message 2018-09-20 22:05:10 +08:00
once.go pkg: mv models to cronsun 2017-05-12 14:48:24 +08:00
proc.go Use struct instead of map, rewrite api of killing process 2018-09-15 18:04:13 +08:00
release.sh Add releash script 2017-05-16 16:32:50 +08:00
version.go v0.3.5 2018-11-20 21:13:19 +08:00

README.md

cronsun Build Status

cronsun is a distributed cron-style job system. It's similar with crontab on stand-alone *nix.

简体中文

Purpose

The goal of this project is to make it much easier to manage jobs on lots of machines and provides high availability. cronsun is different from Azkaban, Chronos, Airflow.

Features

  • Easy manage jobs on multiple machines
  • Management panel
  • Mail service
  • Multi-language support
  • Simple authentication and accounts manager(default administrator email and password: admin@admin.com/admin)

Status

cronsun has been tested in production for years on hundreds of servers. Although the current version is not release as an stable version, but we think it is completely available for the production environment. We encourage you to try it, it's easy to use, see how it works for you. We believe you will like this tool.

Architecture

                                                [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)

Security

cronsun support security with security.json config. When open=true job command is only allow local files with special extension on the node.

{
    "open": true,
    "#users": "allowed execution users",
    "users": [
        "www", "db"
    ],
    "#ext": "allowed execution file extensions",
    "ext": [
        ".cron.sh", ".cron.py"
    ]
}

Getting started

Setup / installation

Install from binary latest release

Or build from source, require go >= 1.11+.

NOTE: The branch master is not in stable, using Cronsun for production please checkout corresponding tags.

export GO111MODULE=on
go get -u github.com/shunfei/cronsun
cd $GOPATH/src/github.com/shunfei/cronsun
go mod vendor
sh build.sh

Run

  1. Install MongoDB
  2. Install etcd3
  3. Open and update Etcd(conf/etcd.json) and MongoDB(conf/db.json) configurations
  4. Start cronnode: ./cronnode -conf conf/base.json, start cronweb: ./cronweb -conf conf/base.json
  5. Open http://127.0.0.1:7079 in browser
  6. Login with username admin@admin.com and password admin

Screenshot

Brief:

Exec result:

Job:

Node:

Credits

cron is base on robfig/cron