Fork of ouqiang/gocron
Using Golang to implement a light schedule job running and managing system, it can replace Linux-crontab Check doc
Original DelayJob
was put it into another project DelayQueue
- Web console to manage schedule job
- Crontab expression, acurate to second level
- Job failed can use retry
- Job timeout, will force exit
- Job dependency, Job A --> Job B
- User access permission
- Job type
- shell job
In node to run shell command, support to run in multiple nodes same time
- HTTP job
use http URL, will run by gocron server, no need node
- Job running log
- Notification: email、Slack、Webhook
Scheduler ----|--> Node 1
|--> Node 2
|--> Node 3
Linux, Mac OS, Windows
- Sqlite3
- MySQL
- Postgres
- tar -xvzf [xxx.gz]
cd [unziped folder]
- Run apps
- Run Scheduler
- Windows:
gocron.exe web
- Linux、Mac OS:
./gocron web
- Windows:
- Run Node, default on: 0.0.0.0:5921
- Windows:
gocron-node.exe
- Linux、Mac OS:
./gocron-node
- Windows:
- Browse the url: http://localhost:5920
- Install Golang 1.11+
go get -d github.com/ouqiang/gocron
export GO111MODULE=on
- compile
make
- Run
- gocron
./bin/gocron web
- gocron-node
./bin/gocron-node
- gocron
docker run --name gocron --link mysql:db -p 5920:5920 -d ouqg/gocron
Setting: /app/conf/app.ini
Log: /app/log/cron.log
- Install Golang 1.9+, Node.js, Yarn
- Front end dependency
make install-vue
- Run gocron, gocron-node
make run
- Run node server
make run-vue
, browse http://localhost:8080
request to http://localhost:8080, API request will forward to gocron
make
compile
make run
compile and run
make package
package
produce the gzip package for app: gocron-v1.5-darwin-amd64.tar.gz gocron-node-v1.5-darwin-amd64.tar.gz
make package-all
produce Windows、Linux、Mac gzip package
-
gocron
- -v version
-
gocron web
- --host default 0.0.0.0
- -p port, default 5920
- -e environment, dev|test|prod, dev mode having more logs, default
prod
- -h help
-
gocron-node
- -allow-root *nix allow to run as
root
- -s ip:port listen on address
- -enable-tls enable TLS
- -ca-file CA files
- -cert-file cert file
- -key-file key file
- -h help
- -v version
- -allow-root *nix allow to run as
- version upgrade
- batch start, clos, delete jobs
- Scheduler communicate with Node support https
- Job groups
- Multiple user
- User Access permissions
- Web Macaron
- Scheduler Cron
- ORM Xorm
- UI Element UI
- RPC gRPC
raise issue
v1.6.0
- Support
Sqlite3
- Better handle long run shell job
- shell cmd output result to log
- keep max 2000 lines in buffer to minimize memory usage
- Fix
shell
mode timeout goroutine leaking - UI support international (en, zh)
- Backend support international (en, zh)
- GoCron default lang setting in app.ini (app.lang = en)
v1.6.1
- Fix Panic possibly due to x/sys version Go 1.17 segmentation violation on MacOS Big Sur logrus old version sirupsen/logrus#1285