Skip to content
A Distributed, Fault-Tolerant Cron-Style Job System.
Go Vue JavaScript Other
Branch: master
Clone or download
QLeelulu Merge pull request #140 from shunfei/fix/id-gen
fixed NextID() generate duplicate id when restarts the web process multiple times
Latest commit 6b8ba93 Jun 26, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update issue template May 24, 2017
bin some optimize: Sep 7, 2018
conf fixed conf sample format error Nov 20, 2018
db mongo auth with authSource Nov 20, 2018
doc/img Update screenshot(en) of dashboard page Mar 8, 2018
event bugfix: emit nil event Feb 24, 2018
log Added login and accounts manager modules Jun 29, 2017
node Fix add node to group Nov 30, 2018
utils remove useless code Oct 17, 2017
web Merge pull request #123 from lbbniu/master_ui_optimize Nov 29, 2018
.editorconfig 检查用作key的id和名称,添加获取活动节点的接口 May 9, 2017
.gitignore cmd: Add rmold command for node May 26, 2018
.travis.yml ci for go module Sep 6, 2018
LICENSE Update LICENSE Oct 26, 2017
README.md Change config: open auth by default Sep 21, 2018
README_ZH.md Update README_ZH.md Sep 26, 2018
account.go Added new readonly role: Reporter May 5, 2018
build.sh Update build.sh to build new tool: csctl Mar 8, 2018
client.go Baned backslash in group name Jul 18, 2018
common.go csctl: for cmd tools, watch configuration files is unnecessary. Feb 23, 2018
csctl.go csctl: add sync command for node to sync node info to mongodb May 26, 2018
errors.go Baned backslash in group name Jul 18, 2018
go.mod run go mod tidy Sep 15, 2018
go.sum run go mod tidy Sep 15, 2018
group.go remove github.com/coreos/etcd/mvcc/mvccpb Feb 24, 2018
id.go fixed NextID() generate duplicate id when restarts the web process mu… Apr 11, 2019
job.go fix incorrect retry times Jan 22, 2019
job_log.go UI: Mar 19, 2018
mdb.go pkg: mv models to cronsun May 12, 2017
node.go csctl: add sync command for node to sync node info to mongodb May 26, 2018
noticer.go more clearly email message Sep 20, 2018
once.go pkg: mv models to cronsun May 12, 2017
proc.go Use struct instead of map, rewrite api of killing process Sep 15, 2018
release.sh Add releash script May 16, 2017
version.go v0.3.5 Nov 20, 2018

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

You can’t perform that action at this time.