Releases: changkun/sched
sched 0.8.1
sched 0.8.0
sched 0.8.0 replaces gomodules/redigo by go-redis/redis.
There are no API changes.
sched 0.7.0
sched
0.7.0 introduces future support. For instance:
// Setup tasks, use future.Get() to retrieve the future of task
future, err := sched.Submit(&ArbitraryTask{...})
if err != nil {
panic(err)
}
fmt.Printf("%v", future.Get())
// Launch a task, use future.Get() to retrieve the future of task
future, err := sched.Trigger(&ArbitraryTask{...})
if err != nil {
panic(err)
}
fmt.Printf("%v", future.Get())
see docs for more usage.
sched 0.6.0
sched
is a high performance task scheduling library.
Getting started
// Init sched, with tasks should be recovered when reboot
sched.Init("redis://127.0.0.1:6379/1", &ArbitraryTask1{}, &ArbitraryTask2{})
// Setup tasks
sched.Submit(&ArbitraryTask1{...}, &ArbitraryTask2{...})
// Launch a task
sched.Trigger(&ArbitraryTask1{...}, &ArbitraryTask2{...})
// Pause scheduling
sched.Pause()
// Resume scheduling
sched.Resume()
// Stop scheduler gracefully
sched.Stop()
sched 0.5.1
goscheduler
is renamed to sched
for short, 0.5.0 add more decent tests for all.
Usage
// Init sched database
sched.Init("redis://127.0.0.1:6379/1")
// Recover tasks
sched.Recover(&ArbitraryTask1{}, &ArbitraryTask2{})
// Setup tasks
sched.Setup(&ArbitraryTask1{...}, &ArbitraryTask2{...})
// Launch a task
sched.Launch(&ArbitraryTask1{...}, &ArbitraryTask2{...})
sched 0.5.0
goscheduler
is renamed to sched
for short, 0.5.0 add more decent tests for all.
Usage
// Init sched database
sched.Init("redis://127.0.0.1:6379/1")
// Recover tasks
sched.Recover(&ArbitraryTask1{}, &ArbitraryTask2{})
// Setup tasks
sched.Setup(&ArbitraryTask1{...}, &ArbitraryTask2{...})
// Launch a task
sched.Launch(&ArbitraryTask1{...}, &ArbitraryTask2{...})
goscheduler 0.4.0
goscheduler
0.4.0 rewrites everything inside this package by using a priority queue, which archives a high-performance with minimum costs of goroutines.
Features
- Flexible Scheduling
- Single execution, period-equally execution, period-inequally execution
- Microkernel Embedding
- Embedding into an application without change existing code
- Distributed Reliability
- A task can only be executed once across replica instances
- Eventually Consistency
- All tasks that scheduled must be executed eventually
- Fault Tolerance
- Recover when restart, retry if needed or on error
Benchmarks
See benchmarks getting to know more analysis of goscheduler
performance.
goscheduler 0.3.1
goscheduler
is a consistently reliable task scheduler library for GO, which applies to be a microkernel of an internal application service, and pluggable tasks must implements goscheduler
Task interface.
goscheduler
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, goscheduler
uses a distributed lock mechanism that ensures tasks can only be executed once across multiple replica instances.
Features
zh-CN
README language support
goscheduler 0.3.0
goscheduler is now stable
Feature
- distributed consistency
goscheduler 0.2.3
goscheduler is now stable
Updates
- optimize for thread safety