Libraries
task-master.go
A customisable task execution system and library for Go.
Why it existsRunning recurring jobs from Go shouldn't mean pulling in a heavy scheduler. task-master.go runs interval-based tasks in a few lines, with no third-party dependencies.
Schedule and run tasks from Go code with zero external dependencies.
- Stars
- 0 stars
- Forks
- 0 forks
- Last push
- Updated 4 years ago
Languages
Go100.0%
README.md
task-master.go
customizable task execution system and library written in go with no dependancy
Usage
go get github.com/dev-asterix/task-master.go
simple scheduler based on time interval
package main
import (
"github.com/dev-asterix/task-master.go/scheduler"
)
func main() {
// create a new scheduler
s := scheduler.NewIntervalBased(10, scheduler.Second)
for {
// run tasks
s.Schedule() // calculate next schedule and wait for it
// runs after scheduled interval (here, 10 seconds)
}
}
Code.Share.Prosper