This package provides a task scheduler in Go with support for both static and predictive scheduling of tasks.
- Static Scheduling: Schedule tasks with cron-like syntax.
- Predictive Scheduling: Automatically estimate future execution times based on runtime behavior.
- Extensible Design: Easy to add custom matchers or prediction models.
go get github.com/escabora/scheduler
import (
"github.com/escabora/scheduler/internal/schedule"
)
func main() {
s := schedule.NewScheduler()
s.AddTask("* * * * *", func() {
fmt.Println("Running static task")
})
s.Start()
defer s.Stop()
}
Run tests with:
go test ./tests/...