{"id":37123831,"url":"https://github.com/pariola/sched","last_synced_at":"2026-01-14T14:17:55.699Z","repository":{"id":95756920,"uuid":"437388913","full_name":"pariola/sched","owner":"pariola","description":"a simple scheduler (wip)","archived":false,"fork":false,"pushed_at":"2023-02-27T00:11:39.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T16:55:27.445Z","etag":null,"topics":["priority-queue","priority-scheduling","scheduler"],"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/pariola.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-12-11T21:06:27.000Z","updated_at":"2023-03-05T08:17:21.000Z","dependencies_parsed_at":"2023-05-21T22:45:43.549Z","dependency_job_id":null,"html_url":"https://github.com/pariola/sched","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pariola/sched","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pariola%2Fsched","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pariola%2Fsched/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pariola%2Fsched/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pariola%2Fsched/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pariola","download_url":"https://codeload.github.com/pariola/sched/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pariola%2Fsched/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28422578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"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":["priority-queue","priority-scheduling","scheduler"],"created_at":"2026-01-14T14:17:55.181Z","updated_at":"2026-01-14T14:17:55.690Z","avatar_url":"https://github.com/pariola.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sched\n\nan attempt at creating a simple scheduler.\n\nIt relies on a priority queue (ex. Binary Heap) to maintain all the jobs needed to be scheduled.\n\n### Features\n\n- [ ] state persistence\n- [x] cancel pending job\n\n### In Action\n\n```go\nfunc main() {\n\ts := sched.New(sched.Config{\n\t\tN: 10,\n\t\tQ: queue.BinaryHeap(),\n\t\tSink: func(id int, job sched.Job) {\n\t\t\tfmt.Printf(\"by worker: %d | message: %s\\n\", id, job.Msg)\n\t\t},\n\t})\n\n\tnow := time.Now()\n\n\t// queue messages\n\tfor i := 0; i \u003c 5; i++ {\n\t\tmsg := fmt.Sprintf(\"msg %d\", i)\n\t\ts.Queue([]byte(msg), now.Add(3*time.Second))\n\t}\n\n\tjobOneId := s.Queue([]byte(\"missing!\"), now.Add(2*time.Second))\n\n\ts.Queue([]byte(\"You rock!\"), now.Add(2*time.Second))\n\n\t// cancel job\n\ts.CancelJob(jobOneId)\n}\n```\n\nResult:\n\n```txt\nby worker: 9 | message: You rock!\nby worker: 4 | message: msg 3\nby worker: 5 | message: msg 0\nby worker: 6 | message: msg 1\nby worker: 7 | message: msg 2\nby worker: 8 | message: msg 4\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpariola%2Fsched","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpariola%2Fsched","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpariola%2Fsched/lists"}