This issue recommends gocron, a scheduled task management system based on GO language.
gocron is a lightweight centralized scheduling and management system for scheduled tasks developed in Go language. It is mainly used to replace Linux-crontab.
class=”pgc-h-arrow-right” data-track=”5″>
- Web interface to manage scheduled tasks
- crontab time expression, accurate to second
- Retry if the task fails
- Task execution timeout, forced to end
- Task dependent configuration, task A completes before executing task B
- Account permission control
- shell task: execute shell command on task node, support task to run on multiple nodes at the same time
- HTTP task: accesses the specified URL address, executed directly by the scheduler, independent of the task node
- View task execution result log
- Task execution result notification, support mail, Slack, Webhook
- Support for Windows, Linux, Mac OS
class=”pgc-h-arrow-right” data-track=”21″>
class=”pgc-h-arrow-right” data-track=”24″> Install
Binary installation
1 Unzip the zip
https://github.com/ouqiang/gocron/releases
2 cd extract directory
3 Start
- Scheduler starts
Windows: gocron.exe web
Linux, Mac OS: ./gocron web
- Task node starts, default listening 0.0.0.0:5921
Windows: gocron-node.exe
Linux, Mac OS: ./gocron-node
4 Go to http://localhost:5920
Source code installation
- Install Go 1.11+
- go get -d github.com/ouqiang/gocron
- export GO111MODULE=on
- compile make
- Start
gocron ./bin/gocron web
gocron-node ./bin/gocron-node
docker
docker run --name gocron --link mysql:db -p 5920:5920 -d ouqg/gocron
Config: /app/conf/app.ini
log: /app/log/cron.log
The image does not contain the gocron-node, and the gocron-node needs to be built with the specific business
—END—
Open source protocol: MIT