{"id":13764062,"url":"https://github.com/whiteShtef/clockwork","last_synced_at":"2025-05-10T17:31:33.135Z","repository":{"id":57481071,"uuid":"242028236","full_name":"whiteShtef/clockwork","owner":"whiteShtef","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-01T12:13:35.000Z","size":315,"stargazers_count":27,"open_issues_count":2,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-14T09:21:49.807Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/whiteShtef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-21T01:25:57.000Z","updated_at":"2023-03-04T16:27:09.000Z","dependencies_parsed_at":"2022-09-26T17:41:23.847Z","dependency_job_id":null,"html_url":"https://github.com/whiteShtef/clockwork","commit_stats":null,"previous_names":["whiteshtef3/clockwork"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteShtef%2Fclockwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteShtef%2Fclockwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteShtef%2Fclockwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteShtef%2Fclockwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whiteShtef","download_url":"https://codeload.github.com/whiteShtef/clockwork/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253453325,"owners_count":21911078,"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":[],"created_at":"2024-08-03T15:01:11.554Z","updated_at":"2025-05-10T17:31:32.603Z","avatar_url":"https://github.com/whiteShtef.png","language":"Go","funding_links":[],"categories":["Utilities","作业调度","Job Scheduler","实用工具","工具库"],"sub_categories":["SQL 查询语句构建库","Advanced Console UIs","HTTP Clients","交流"],"readme":"# clockwork\n\n\u003cp align=\"center\"\u003e\u003cimg height=250 src =\"https://github.com/whiteShtef/clockwork/raw/master/assets/logo/large.png\" /\u003e\u003c/p\u003e\n\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) \n[![GoDoc](https://godoc.org/github.com/whiteshtef/clockwork?status.svg)](https://godoc.org/github.com/whiteshtef/clockwork)\n[![Go Report Card](https://goreportcard.com/badge/github.com/whiteshtef/clockwork)](https://goreportcard.com/report/github.com/whiteshtef/clockwork)\n![Coverage](http://gocover.io/_badge/github.com/whiteshtef/clockwork)\n\n\nA simple and intuitive scheduling library in Go.\n\nInspired by [python's schedule](https://github.com/dbader/schedule) and [ruby's clockwork](https://github.com/adamwiggins/clockwork) libraries.\n\n\n## Example use\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/whiteshtef/clockwork\"\n)\n\nfunc main() {\n\tsched := clockwork.NewScheduler()\n\n\tsched.Schedule().Every(10).Seconds().Do(something)\n\tsched.Schedule().Every(3).Minutes().Do(something)\n\tsched.Schedule().Every(4).Hours().Do(something)\n\tsched.Schedule().Every(2).Days().At(\"12:32\").Do(something)\n\tsched.Schedule().Every(12).Weeks().Do(something)\n\n\tsched.Schedule().Every().Second().Do(something) // Every() is \"shorthand\" for Every(1)\n\tsched.Schedule().Every().Monday().Do(something)\n\tsched.Schedule().Every().Saturday().At(\"8:00\").Do(something)\n\n\tsched.Run()\n}\n\nfunc something() {\n\tfmt.Println(\"foo\")\n\n}\n```\n\nThe package uses [go dep](https://golang.github.io/dep/) for dependency management.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FwhiteShtef%2Fclockwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FwhiteShtef%2Fclockwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FwhiteShtef%2Fclockwork/lists"}