{"id":17032948,"url":"https://github.com/up9cloud/gocron2","last_synced_at":"2026-04-09T07:36:55.120Z","repository":{"id":247534054,"uuid":"821326630","full_name":"up9cloud/gocron2","owner":"up9cloud","description":"A simple scheduler","archived":false,"fork":false,"pushed_at":"2024-08-25T03:54:11.000Z","size":9682,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T01:13:32.036Z","etag":null,"topics":["cron","cronjob","crontab","scheduler"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/up9cloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-28T09:40:28.000Z","updated_at":"2024-08-25T03:54:13.000Z","dependencies_parsed_at":"2024-07-09T08:41:04.115Z","dependency_job_id":"044214ce-2764-4284-8f79-19f2ad041888","html_url":"https://github.com/up9cloud/gocron2","commit_stats":null,"previous_names":["up9cloud/gocron2"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fgocron2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fgocron2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fgocron2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fgocron2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/up9cloud","download_url":"https://codeload.github.com/up9cloud/gocron2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245020342,"owners_count":20548180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cron","cronjob","crontab","scheduler"],"created_at":"2024-10-14T08:31:06.717Z","updated_at":"2025-12-30T23:43:42.183Z","avatar_url":"https://github.com/up9cloud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"###\n\n2025-04-10 註\n\n本專案比較舊了。\n\n強烈建議改為使用 [青龙](https://github.com/whyour/qinglong) 或是 [n8n](https://github.com/n8n-io/n8n)\n\n###\n\n# gocron2\n\n[![Downloads](https://img.shields.io/github/downloads/up9cloud/gocron2/total.svg)](https://github.com/up9cloud/gocron2/releases)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/up9cloud/gocron2/blob/master/LICENSE)\n[![Release](https://img.shields.io/github/release/up9cloud/gocron2.svg?label=Release)](https://github.com/up9cloud/gocron2/releases)\n\n定时任务管理系统\n\n## 项目简介\n\n使用Go语言开发的轻量级定时任务集中调度和管理系统, 用于替代 Linux-crontab\n\n原有的延时任务拆分为独立项目[延迟队列](https://github.com/ouqiang/delay-queue)\n\n原項目 [https://github.com/ouqiang/gocron](https://github.com/ouqiang/gocron) 的作者不更新了。[此為原文档](https://github.com/up9cloud/gocron2/wiki)\n\n所以基於大家的 Folks 搞了新的 `gocron2` 縫合怪，詳細縫合訊息請看下方 Credits\n\n## 功能特性\n\n- Web界面管理定时任务\n- crontab时间表达式, 精确到秒\n- 任务执行失败可重试\n- 任务执行超时, 强制结束\n- 任务依赖配置, A任务完成后再执行B任务\n- 账户权限控制\n- 任务类型\n  - shell任务\n  \u003e 在任务节点上执行shell命令, 支持任务同时在多个节点上运行\n  - HTTP任务\n  \u003e 访问指定的URL地址, 由调度器直接执行, 不依赖任务节点\n- 查看任务执行结果日志\n- 任务执行结果通知, 支持邮件、Slack、Webhook\n\n## 截图\n\n![列表](./assets/screenshot/task.png)\n\n![日志](./assets/screenshot/task-log.png)\n\n![节点](./assets/screenshot/node.png)\n\n![webhook](./assets/screenshot/webhook.png)\n\n## 流程图\n\n![流程图](./assets/screenshot/scheduler.png)\n\n## 支持平台\n\n\u003e Windows、Linux、Mac OS\n\n## 环境要求\n\n\u003e MySQL\n\n## 安装\n\n### 二进制安装\n\n- 解压压缩包  \n- `cd 解压目录`\n- 启动\n  - 调度器启动\n    - Windows: `gocron2.exe web`\n    - Linux、Mac OS:  `./gocron2 web`\n  - 任务节点启动, 默认监听 0.0.0.0:5921\n    - Windows:  `gocron2-node.exe`\n    - Linux、Mac OS:  `./gocron2-node`\n- 浏览器访问 `http://localhost:5920`\n\n### 源码安装\n\n- 安装Go 1.16+\n- `go get -d github.com/up9cloud/gocron2`\n- `export GO111MODULE=on`\n- 编译 `make`\n- 启动\n  - gocron2 `./bin/gocron2 web`\n  - gocron2-node `./bin/gocron2-node`\n\n### docker\n\nSee: `https://github.com/docker-sstc/docker-gocron2`\n\n配置: /app/conf/app.ini\n\n日志: /app/log/cron.log\n\n## 命令\n\n- gocron2\n  - -v 查看版本\n- gocron2 web\n  - --host 默认0.0.0.0\n  - -p 端口, 指定端口, 默认5920\n  - -e 指定运行环境, dev|test|prod, dev模式下可查看更多日志信息, 默认prod\n  - -h 查看帮助\n- gocron2-node\n  - -allow-root *nix平台允许以root用户运行\n  - -s ip:port 监听地址\n  - -enable-tls 开启TLS\n  - -ca-file   CA证书文件\n  - -cert-file 证书文件\n  - -key-file  私钥文件\n  - -h 查看帮助\n  - -v 查看版本\n\n## 开发安装\n\n- 安装 Go1.16+, Node.js (Npm), Docker\n- 启动 gocron2, gocron2-node `docker compose up`\n- 启动前端, `make run-vue`\n  - install 的時候，主机名填入 `db`\n  - API请求預設会转发给 gocron2, 若要代理到遠端伺服器, 需新增 `web/vue/.secret.config.js` 檔案加參數, 詳閱 `web/vue/vite.config.js`\n\n`其他指令請詳查 ./makefile`\n\n## 發布\n\n- edit CHANGELOG.md\n- edit `AppVersion` in main.go\n- git commit\n- git tag vx.x.x\n- git push \u0026\u0026 git push --tags\n- wait for github action\n\n## TODO\n\n- [ ] Move readme commands intro to cli\n- [ ] merge `https://github.com/peng49/gocron`\n- [ ] Fix or remove super admin logic\n- [x] Support sqlite3 (Only for 开发安装)\n- [x] 版本升级\n- [x] 批量开启、关闭、删除任务\n- [x] 调度器与任务节点通信支持https\n- [x] 任务分组\n- [x] 多用户\n- [x] 权限控制\n\n## 程序使用的组件\n\n- Web框架 [Macaron](http://go-macaron.com/)\n- 定时任务调度 [Cron](https://github.com/robfig/cron)\n- ORM [Xorm](https://github.com/go-xorm/xorm)\n- UI框架 [Element Plus](https://element-plus.org)\n- 依赖管理 [Govendor](https://github.com/kardianos/govendor)\n- RPC框架 [gRPC](https://github.com/grpc/grpc)\n\n## Credits\n\n- `https://github.com/ouqiang/gocron/pull/375`\n- `https://github.com/gaowei-space/gocron`\n- `https://github.com/ghostong/gocron.git`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fgocron2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fup9cloud%2Fgocron2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fgocron2/lists"}