github.com/changkun/sched (go): Package sched provides a consistently reliable task scheduler with future support.  sched is a consistently reliable embedded task scheduler library for Go. It applies to be a microkernel of an internal application service, and pluggable tasks must implements sched Task interface.  sched not only schedules a task at a specific time or reschedules a planned task immediately, but also flexible to support periodically tasks, which differ from traditional non-consistently unreliable cron task scheduling.  Furthermore, sched manage tasks, like goroutine runtime scheduler, uses greedy scheduling schedules all tasks and a distributed lock mechanism that ensures tasks can only be executed once across multiple replica instances.  Callers must initialize sched database when using sched. sched schedules different tasks in a priority queue and schedules task with minimum goroutines when tasks with same execution time arrival:  A Task that can be scheduled by sched must implements the following task interface:  Note that your task must be a serilizable struct by `json.Marshal()`, otherwise it cannot be persist by goshceudler (e.g. `type Func func()` cannot be scheduled)  A Task can have a future of its final execution result. `sched.Submit` and `sched.Trigger` both returns future object of `Execute()`'s `result interface{}`. To get the future:
Keywords: go|golang|high-performance|persistence|scheduler