{"id":15591350,"url":"https://github.com/zhashkevych/scheduler","last_synced_at":"2026-02-17T14:01:20.676Z","repository":{"id":42059074,"uuid":"186011971","full_name":"zhashkevych/scheduler","owner":"zhashkevych","description":"Golang tool for scheduling functions execution within a given interval","archived":false,"fork":false,"pushed_at":"2022-04-14T20:34:03.000Z","size":6,"stargazers_count":51,"open_issues_count":2,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-11T02:39:13.221Z","etag":null,"topics":["go","golang","golang-library","golang-tools","task-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/zhashkevych.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":"2019-05-10T15:28:41.000Z","updated_at":"2025-06-07T23:38:47.000Z","dependencies_parsed_at":"2022-07-19T22:03:06.661Z","dependency_job_id":null,"html_url":"https://github.com/zhashkevych/scheduler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zhashkevych/scheduler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fscheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fscheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fscheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fscheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhashkevych","download_url":"https://codeload.github.com/zhashkevych/scheduler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fscheduler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29546746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T13:00:00.370Z","status":"ssl_error","status_checked_at":"2026-02-17T12:57:14.072Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","golang","golang-library","golang-tools","task-scheduler"],"created_at":"2024-10-02T23:41:04.842Z","updated_at":"2026-02-17T14:01:20.385Z","avatar_url":"https://github.com/zhashkevych.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Go Scheduler\n================================\n\n## \u003ca href=\"https://medium.com/@zhashkevych/simple-scheduling-library-golang-384ad72717f5\"\u003eBlog Post\u003c/a\u003e\n\nGo Scheduler helps you to manage functions that should be executed every N seconds/minutes/hours etc.\n\nSee it in action:\n\n## Example #1\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"time\"\n  \"os\"\n  \"os/signal\"\n  \"context\"\n  \"github.com/zhashkevych/scheduler\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tworker := scheduler.NewScheduler()\n\tworker.Add(ctx, parseSubscriptionData, time.Second*5)\n\tworker.Add(ctx, sendStatistics, time.Second*10)\n\n\tquit := make(chan os.Signal, 1)\n\tsignal.Notify(quit, os.Interrupt, os.Interrupt)\n\n\t\u003c-quit\n\tworker.Stop()\n}\n\nfunc parseSubscriptionData(ctx context.Context) {\n\ttime.Sleep(time.Second * 1)\n\tfmt.Printf(\"subscription parsed successfuly at %s\\n\", time.Now().String())\n}\n\nfunc sendStatistics(ctx context.Context) {\n\ttime.Sleep(time.Second * 5)\n\tfmt.Printf(\"statistics sent at %s\\n\", time.Now().String())\n}\n\n```\n\n## Example #2\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/signal\"\n\t\"time\"\n\n\t\"github.com/zhashkevych/scheduler\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tsc := scheduler.NewScheduler()\n\tsc.Add(ctx, testFunc, time.Second*2)\n\n\tquit := make(chan os.Signal, 1)\n\tsignal.Notify(quit, os.Interrupt)\n\n\t\u003c-quit\n\tworker.Stop()\n}\n\nfunc testFunc(ctx context.Context) {\n\tctx, _ = context.WithTimeout(ctx, time.Second*5)\n\n\ti := 0\n\tfor {\n\t\ttime.Sleep(time.Millisecond * 100)\n\t\ti++\n\t\tfmt.Printf(\"%d \", i)\n\n\t\tselect {\n\t\tcase \u003c-ctx.Done():\n\t\t\tfmt.Println()\n\t\t\treturn\n\t\tdefault:\n\t\t}\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhashkevych%2Fscheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhashkevych%2Fscheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhashkevych%2Fscheduler/lists"}