{"id":21852187,"url":"https://github.com/brucedone/clock","last_synced_at":"2025-04-09T23:18:56.634Z","repository":{"id":50281947,"uuid":"279579294","full_name":"BruceDone/clock","owner":"BruceDone","description":"可视化任务调度系统，精简到一个二进制文件 (Web visual task scheduler system , yes ! just one binary solve all the problems !)","archived":false,"fork":false,"pushed_at":"2024-05-20T17:45:15.000Z","size":3462,"stargazers_count":191,"open_issues_count":1,"forks_count":33,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T23:18:48.734Z","etag":null,"topics":["dag-scheduling","gocron","scheduler","task","taskflow","visual","web","web-scheduler","webscraping"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BruceDone.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2020-07-14T12:29:49.000Z","updated_at":"2025-04-09T14:25:02.000Z","dependencies_parsed_at":"2024-12-18T08:10:22.657Z","dependency_job_id":"24a21027-c107-4d2e-99d3-77c7b9c26ee9","html_url":"https://github.com/BruceDone/clock","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceDone%2Fclock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceDone%2Fclock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceDone%2Fclock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceDone%2Fclock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BruceDone","download_url":"https://codeload.github.com/BruceDone/clock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125634,"owners_count":21051776,"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":["dag-scheduling","gocron","scheduler","task","taskflow","visual","web","web-scheduler","webscraping"],"created_at":"2024-11-28T01:14:15.929Z","updated_at":"2025-04-09T23:18:56.583Z","avatar_url":"https://github.com/BruceDone.png","language":"Go","readme":"\u003cdiv align=center\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/12979090/86565300-297abd80-bf9a-11ea-916f-b547f5023ee8.png\" /\u003e \n\u003c/div\u003e\n\n## Clock\n基于go cron的可视化调度轻量级调度框架，支持DAG任务依赖，支持bash命令，前端及后端编译完成(基于packr2)后仅有一个二进制文件，轻松部署\n\n## 地址\n* 后台: https://github.com/BruceDone/clock\n* 前台: https://github.com/BruceDone/clock-admin\n\n## 环境\n* 后端\n    * go 1.20\n    * [packr](https://github.com/gobuffalo/packr) - 静态文件打包\n    * [cron](https://github.com/robfig/cron) - 定时调度器\n    * [echo](https://github.com/labstack/echo)\n    * [gorm](https://github.com/jinzhu/gorm)\n* 前端\n    * vue \n    * [iview-admin](https://github.com/iview/iview-admin)\n\n## 使用\n### 直接使用\n下载git上的release列表，根据系统下载相应的二进制文件，使用命令\n```\n./clock -c ./config/dev.yaml\n```\n\n### 自己编译前后端\n将前端项目 clock-admin 下载到本地，使用命令 `npm run build`, 编译生成前端项目文件`dist`, 将后端项目 clock 下载到本地, 进入项目根目录，确保安装了packr2 ,使用如下命令\n\n```shell script\nrm -rf webapp\nmkdir -p ./webapp\ncp -r /你的clock-admin文件夹/dist/* ./webapp\npackr2 clean\npackr2\n# 根据发布的目标平台，调整如下命令\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go generate  \nCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build\n```\n\n使用命令`./clock -c config/dev.yaml` 载入你的配置文件，完成后打开浏览器 `http://127.0.0.1:9528` ，输入用户名密码就可以进入管理后台\n![login](https://user-images.githubusercontent.com/12979090/86568293-3948d080-bf9f-11ea-9c19-4cf68af595a0.png)\n\n## 结构\n```\n├── config - 配置文件夹,示例文件所在\n├── controller - 控制层\n├── packrd - packr2生成的静态资源\n├── param - 参数相关\n├── runner - 执行器\n├── server - view层\n├── storage - 存储相关\n└── webapp - 由clock-admin发布的前端资源\n    ├── css\n    ├── fonts\n    ├── img\n    └── js\n```\n\n## 特性与功能\n* [DAG任务关联](https://en.wikipedia.org/wiki/Dag) , 可以管理任务的前后依赖\n* 可视化管理\n* 支持多种数据库: sqlite , mysql ,postgresql\n* 前后端打包完成后只有一个二进制文件，极其方便部署\n* 跨平台\n\n## 使用截图\n\n### 登录进入控制台 \n![personal](https://user-images.githubusercontent.com/12979090/86567691-5c26b500-bf9e-11ea-8c3c-98a75120ce18.jpg)\n\n### 添加任务容器\n![fathertask](https://user-images.githubusercontent.com/12979090/86567720-6779e080-bf9e-11ea-9168-18dc751d730e.jpg)\n\n点击新增，调度表达式这里支持cron和@every语法，更多语法请参考:[cron](https://github.com/robfig/cron)\n\n### 点击配置进入子任务配置界面\n![taskdag](https://user-images.githubusercontent.com/12979090/86567779-7a8cb080-bf9e-11ea-8622-fc924f4a5ba8.jpg)\n\n点击任务编辑下的新增，选中新增的节点，编辑任务bash命令，任务名，是否保存日志，及任务超时时间(小技巧:选中画板空白处为新增，选中节点为编辑状态)，可以自由编辑节点(任务)之间的关系，摆好位置之后选择保存\n\n### 查看后台任务输出日志\n![status](https://user-images.githubusercontent.com/12979090/86567810-84aeaf00-bf9e-11ea-82b6-4bd585d7df7c.jpg)\n\n### 查看持久化的日志\n![loglist](https://user-images.githubusercontent.com/12979090/86567837-8e381700-bf9e-11ea-9812-43a7189a2827.jpg)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucedone%2Fclock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrucedone%2Fclock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucedone%2Fclock/lists"}