You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
miraclesu 0e5a7b9acb
Merge pull request #185 from leemo1989/master
4 years ago
.github
bin Merge pull request #113 from imxyb/feature/import-crontab 4 years ago
conf fixed conf sample format error 6 years ago
db mongo auth with authSource 6 years ago
doc/img Update screenshot(en) of dashboard page 7 years ago
event bugfix: emit nil event 7 years ago
log
node Fix add node to group 6 years ago
utils
web 1、修复当数据库过大时,前端默认没有选择日期,导致的查询超时问题。增加了前端默认选择日期为当前日期 4 years ago
.editorconfig
.gitignore cmd: Add rmold command for node 7 years ago
.travis.yml ci for go module 6 years ago
LICENSE
README.md Change config: open auth by default 6 years ago
README_ZH.md a typo 4 years ago
account.go Added new readonly role: Reporter 7 years ago
build.sh Update build.sh to build new tool: csctl 7 years ago
client.go Baned backslash in group name 6 years ago
common.go
csctl.go csctl: add sync command for node to sync node info to mongodb 7 years ago
errors.go Baned backslash in group name 6 years ago
go.mod run go mod tidy 6 years ago
go.sum run go mod tidy 6 years ago
group.go
id.go fixed NextID() generate duplicate id when restarts the web process multiple times 6 years ago
job.go fix incorrect retry times 6 years ago
job_log.go UI: 7 years ago
mdb.go
node.go csctl: add sync command for node to sync node info to mongodb 7 years ago
noticer.go more clearly email message 6 years ago
once.go
proc.go Use struct instead of map, rewrite api of killing process 6 years ago
release.sh
version.go v0.3.5 6 years ago

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