-
cron jobs(crud)
-
logs for cron jobs
-
swagger apis
- Cofig your
redismysqlhttp server portlogandJWT key. go run main/main.go -create_tableto run the server and create tables in mysql database at first time,go run main/main.gojust run the server.- Open your browser and type http://localhost:8888/swagger/index.html in
- add a cron job
-
Jobs will stop if you stop the server, and jobs will start which status is 1(1 means run, 0 means stop) when the server restart.
-
If you want to exec mutiple commands please post params below:
{ "command": "cd /data/test;python3 test.py", // mutiple commands split by ';' "name": "test1", // job name "spec": "*/10 * * * * *", // run every ten seconds "status": 1 // 1 means add the job and run, 0 means add the job but not run(only run when status is 1) } -
jobs stored in redis and jobs' logs stored in mysql
-
cron jobs based on https://github.com/robfig/cron, so make sure you job spec are correct or it will return
bad requestwhen you add or update a cron job.Documentation here:https://godoc.org/github.com/robfig/cron
