{"id":19230089,"url":"https://github.com/changkun/sched","last_synced_at":"2025-04-21T03:30:28.394Z","repository":{"id":57499515,"uuid":"139245539","full_name":"changkun/sched","owner":"changkun","description":"⏳ a high performance reliable task scheduling package in Go.","archived":false,"fork":false,"pushed_at":"2020-02-16T10:09:02.000Z","size":3474,"stargazers_count":48,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-01T08:11:40.841Z","etag":null,"topics":["go","golang","high-performance","persistence","scheduler"],"latest_commit_sha":null,"homepage":"https://github.com/changkun/sched","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/changkun.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":"2018-06-30T11:54:55.000Z","updated_at":"2025-02-11T21:34:07.000Z","dependencies_parsed_at":"2022-08-28T15:22:27.601Z","dependency_job_id":null,"html_url":"https://github.com/changkun/sched","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fsched","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fsched/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fsched/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changkun%2Fsched/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/changkun","download_url":"https://codeload.github.com/changkun/sched/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249990812,"owners_count":21357156,"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":["go","golang","high-performance","persistence","scheduler"],"created_at":"2024-11-09T15:36:50.798Z","updated_at":"2025-04-21T03:30:28.035Z","avatar_url":"https://github.com/changkun.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sched\n\n[![GoDoc](https://godoc.org/github.com/changkun/sched?status.svg)](https://godoc.org/github.com/changkun/sched) [![Build Status](https://travis-ci.org/changkun/sched.svg?branch=master)](https://travis-ci.org/changkun/sched) [![Go Report Card](https://goreportcard.com/badge/github.com/changkun/sched)](https://goreportcard.com/report/github.com/changkun/sched) [![codecov](https://codecov.io/gh/changkun/sched/branch/master/graph/badge.svg)](https://codecov.io/gh/changkun/sched) [![](https://img.shields.io/github/release/changkun/sched/all.svg)](https://github.com/changkun/sched/releases)\n\n`sched` is a high performance task scheduling library with future support.\n\n## Usage\n\n```go\n// Init sched, with tasks should recovered when reboot\nfutures, err := sched.Init(\n    \"redis://127.0.0.1:6379/1\"， \n    \u0026ArbitraryTask1{}, \n    \u0026ArbitraryTask2{},\n)\nif err != nil {\n    panic(err)\n}\n// Retrieve task's future\nfor i := range futures {\n    fmt.Printf(\"%v\", futures[i].Get())\n}\n\n// Setup tasks, use future.Get() to retrieve the future of task\nfuture, err := sched.Submit(\u0026ArbitraryTask{...})\nif err != nil {\n    panic(err)\n}\nfmt.Printf(\"%v\", future.Get())\n\n// Launch a task, use future.Get() to retrieve the future of task\nfuture, err := sched.Trigger(\u0026ArbitraryTask{...})\nif err != nil {\n    panic(err)\n}\nfmt.Printf(\"%v\", future.Get())\n\n// Pause sched\nsched.Pause()\n\n// Resume sched\nsched.Resume()\n\n// Wait sched schedule all tasks\nsched.Wait()\n\n// Stop sched gracefully\nsched.Stop()\n```\n\n## Task Design\n\nLearn more regarding task design, see [test examples](./tests).\n\n## License\n\n[MIT](./LICENSE) \u0026copy; [Changkun Ou](https://changkun.de)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangkun%2Fsched","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchangkun%2Fsched","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangkun%2Fsched/lists"}